summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-exit-time-destructors.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add a new flag and attributes to control static destructor registrationErik Pilkington2018-08-211-0/+5
| | | | | | | | | | | | | | | | | | | | This commit adds the flag -fno-c++-static-destructors and the attributes [[clang::no_destroy]] and [[clang::always_destroy]]. no_destroy specifies that a specific static or thread duration variable shouldn't have it's destructor registered, and is the default in -fno-c++-static-destructors mode. always_destroy is the opposite, and is the default in -fc++-static-destructors mode. A variable whose destructor is disabled (either because of -fno-c++-static-destructors or [[clang::no_destroy]]) doesn't count as a use of the destructor, so we don't do any access checking or mark it referenced. We also don't emit -Wexit-time-destructors for these variables. rdar://21734598 Differential revision: https://reviews.llvm.org/D50994 llvm-svn: 340306
* Don't emit exit-time destructor warnings for trivial explicitly defaulted dtorsStephan Tolksdorf2014-03-271-1/+19
| | | | | | | | This commit also adds an additional test case for the global destructor warning. Reviewed in http://llvm-reviews.chandlerc.com/D3205 llvm-svn: 204954
* Add a new warning for exit-time destructors.Anders Carlsson2011-03-241-0/+27
llvm-svn: 128188
OpenPOWER on IntegriCloud