summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/static-init.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Throw the switch to exclusively use Evaluate (along with the small Eli Friedman2009-02-221-3/+6
| | | | | | | | | | | | | | | | helper isConstantInitializer) to check whether an initializer is constant. This passes tests, but it's possible that it'll cause regressions with real-world code. Future work: 1. The diagnostics obtained this way are lower quality at the moment; some work both here and in Evaluate is needed for accurate diagnostics. 2. We probably need some extra code when we're in -pedantic mode so we can strictly enforce the rules in C99 6.6p7. 3. Dead code cleanup (this should wait until after 2, because we might want to re-use some of the code). llvm-svn: 65265
* Force arch for these test cases.Daniel Dunbar2009-02-211-1/+1
| | | | llvm-svn: 65252
* emit diagnostic when casting a ptr to a small int when doing static ↵Nuno Lopes2009-02-021-1/+2
| | | | | | initialization (addresses Eli's comments I believe) llvm-svn: 63562
* allow cast from array to int to be considered as constantNuno Lopes2009-02-021-1/+13
| | | | llvm-svn: 63519
* wrap some long diagnostics, make 'initializer is not a constant' diagnosticChris Lattner2008-08-101-2/+2
| | | | | | a bit more clear (rdar://5646070) llvm-svn: 54606
* Allow a pointer implicitly cast to a bool as a constant expression, as Eli Friedman2008-05-301-0/+4
| | | | | | | | | | required by the standard (the standard doesn't know anything about implicit casts). Disallow pointers cast to non-integral arithmetic types as constant expressions. This was previously allowed by accident. llvm-svn: 51779
* Generate code for static variables that don't have initializers. Also, ↵Anders Carlsson2007-10-171-0/+3
report an error if a static initializer is not constant. llvm-svn: 43058
OpenPOWER on IntegriCloud