summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR24612: Don't bail out of checking a constexpr function before checkingRichard Smith2015-08-281-3/+11
| | | | | | | whether it can ever produce a constant expression in the case where it has a void return type and no return statements. llvm-svn: 246347
* C++1y is now C++14!Aaron Ballman2014-08-191-1/+1
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* The 'constexpr implies const' rule for non-static member functions is gone inRichard Smith2013-04-211-1/+1
| | | | | | | | | C++1y, so stop adding the 'const' there. Provide a compatibility warning for code relying on this in C++11, with a fix-it hint. Update our lazily-written tests to add the const, except for those ones which were testing our implementation of this rule. llvm-svn: 179969
* PR14550: If a system header contains a bogus constexpr function definition,Richard Smith2012-12-091-1/+21
| | | | | | don't mark the function as invalid, since we suppress the error. llvm-svn: 169689
* Implement GCC's -Wint-to-pointer-cast.David Blaikie2012-10-161-3/+3
| | | | | | | | | | | | This implementation doesn't warn on anything that GCC doesn't warn on with the exception of templates specializations (GCC doesn't warn, Clang does). The specific skipped cases (boolean, constant expressions, enums) are open for debate/adjustment if anyone wants to demonstrate that GCC is being overly conservative here. The only really obvious false positive I found was in the Clang regression suite's MPI test - apparently MPI uses specific flag values in pointer constants. (eg: #define FOO (void*)~0) llvm-svn: 166039
* Temporary workaround for bug#12457: turn the 'constexpr function never producesRichard Smith2012-04-051-0/+1
| | | | | | | | a constant expression' error into a DefaultError ExtWarn, so that it can be disabled and is suppressed in system headers. libstdc++4.7 contains some such functions which we currently can't evaluate as constant expressions. llvm-svn: 154115
* constexpr tidyups:Richard Smith2012-02-161-5/+10
| | | | | | | | * Fix bug when determining whether && / || are potential constant expressions * Try harder when determining whether ?: is a potential constant expression * Produce a diagnostic on sizeof(VLA) to provide a better source location llvm-svn: 150657
* constexpr: Implement DR1358: An instantiation of a constexpr function whichRichard Smith2012-02-051-0/+25
| | | | | | | can't produce a constant expression is not ill-formed (so long as some instantiation of that function can produce a constant expression). llvm-svn: 149802
* constexpr:Richard Smith2012-02-021-0/+6
| | | | | | | * support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11 * check for unspecified values in pointer comparisons and pointer subtractions llvm-svn: 149578
* constexpr: Implement the [dcl.constexpr]p5 check for whether a constexprRichard Smith2012-01-271-14/+57
| | | | | | | function definition can produce a constant expression. This also provides the last few checks for [dcl.constexpr]p3 and [dcl.constexpr]p4. llvm-svn: 149108
* Add test missed from r143234.Richard Smith2011-10-291-0/+32
llvm-svn: 143257
OpenPOWER on IntegriCloud