For P0784R7: compute whether a variable has constant destruction if it
authorRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 29 Sep 2019 05:08:46 +0000 (05:08 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Sun, 29 Sep 2019 05:08:46 +0000 (05:08 +0000)
commit2b4fa5348ee157b6b1a1af44d0137ca8c7a71573
treeb3ac8e6a34f562040ad1ac1e7876eceac4f40a52
parentac5969933ab7e43d26209ae6c15669842bc86104
For P0784R7: compute whether a variable has constant destruction if it
has a constexpr destructor.

For constexpr variables, reject if the variable does not have constant
destruction. In all cases, do not emit runtime calls to the destructor
for variables with constant destruction.

llvm-svn: 373159
23 files changed:
clang/include/clang/AST/Decl.h
clang/include/clang/Basic/DiagnosticASTKinds.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Interp.cpp
clang/lib/AST/TextNodeDumper.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CGDeclCXX.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/lib/Serialization/ASTWriterDecl.cpp
clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
clang/test/CXX/expr/expr.const/p6-2a.cpp [new file with mode: 0644]
clang/test/CodeGenCXX/attr-no-destroy-d54344.cpp
clang/test/CodeGenCXX/const-init-cxx2a.cpp
clang/test/CodeGenCXX/no_destroy.cpp
clang/test/CodeGenCXX/non-const-init-cxx2a.cpp [new file with mode: 0644]