| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
don't mark the function as invalid, since we suppress the error.
llvm-svn: 169689
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
* support the gcc __builtin_constant_p() ? ... : ... folding hack in C++11
* check for unspecified values in pointer comparisons and pointer subtractions
llvm-svn: 149578
|
|
|
|
|
|
|
| |
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
|
|
llvm-svn: 143257
|