summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-global-constructors.cpp
Commit message (Collapse)AuthorAge
* Don't emit exit-time destructor warnings for trivial explicitly defaulted dtorsStephan Tolksdorf2014-03-27
| | | | | | | | This commit also adds an additional test case for the global destructor warning. Reviewed in http://llvm-reviews.chandlerc.com/D3205 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204954 91177308-0d34-0410-b5e6-96231b3b80d8
* -Wglobal-constructors: Don't warn on trivial defaulted dtorsReid Kleckner2014-03-26
| | | | | | Fixes PR19253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204825 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Expr::isConstantInitializer match IRGen.Eli Friedman2013-07-16
| | | | | | | | | | Sema needs to be able to accurately determine what will be emitted as a constant initializer and what will not, so we get accurate errors in C and accurate -Wglobal-constructors warnings in C++. This makes Expr::isConstantInitializer match CGExprConstant as closely as possible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186464 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9669: implement correct checking for [dcl.init.string]p2.Eli Friedman2011-04-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129260 91177308-0d34-0410-b5e6-96231b3b80d8
* static local variables with destructors don't require a global destructorJohn McCall2010-09-18
| | | | | | | | | | | unless we're on a platform without __cxa_atexit (or use thereof has been disabled). This patch actually just disables the check completely for static locals, but I've filed http://llvm.org/bugs/show_bug.cgi?id=8176 to track the platform-specific fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114269 91177308-0d34-0410-b5e6-96231b3b80d8
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-15
| | | | | | | | | | | | | | | slot. The easiest way to do that was to bundle up the information we care about for aggregate slots into a new structure which demands that its creators at least consider the question. I could probably be convinced that the ObjC 'needs GC' bit should be rolled into this structure. Implement generalized copy elision. The main obstacle here is that IR-generation must be much more careful about making sure that exactly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't give 'global constructor' warnings for function statics, even if they ↵Sebastian Redl2010-09-08
| | | | | | have a direct initializer. Fixes PR8095. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113344 91177308-0d34-0410-b5e6-96231b3b80d8
* Static local variables don't result in global constructors being emitted.Anders Carlsson2010-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112933 91177308-0d34-0410-b5e6-96231b3b80d8
* Further adjustments to -Wglobal-constructors; works for references and directJohn McCall2010-08-02
| | | | | | | | initializations now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill off RequiresGlobalConstructor in favor of isConstantInitializer.John McCall2010-08-01
| | | | | | | | Note some obvious false positives in the test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109986 91177308-0d34-0410-b5e6-96231b3b80d8
* Make a first pass at implementing -Wglobal-constructors. I'm worried that thisJohn McCall2010-08-01
will end up bizarrely mirroring CGExprConstant, but that might be the hazard of this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109984 91177308-0d34-0410-b5e6-96231b3b80d8