]> granicus.if.org Git - clang/commit
Deal with a horrible C++11 special case. If a non-literal type has a constexpr
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 13 Feb 2012 22:16:19 +0000 (22:16 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 13 Feb 2012 22:16:19 +0000 (22:16 +0000)
commit7ca4850a3e3530fa6c93b64b740446e32c97f992
tree4bdd8740e76bd15404199f6d10d6930bbab91cf3
parent5ad3af90dd09b482c61dca565be4b50efcd8021d
Deal with a horrible C++11 special case. If a non-literal type has a constexpr
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150419 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
lib/AST/ExprConstant.cpp
lib/CodeGen/CGCXXABI.cpp
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
lib/Sema/SemaDecl.cpp
test/CXX/class/class.static/class.static.data/p3.cpp
test/CodeGenCXX/const-init-cxx11.cpp