| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
variables in C, in the cases where we can constant-fold it to a value
regardless (such as floating-point division by zero and signed integer
overflow). Strictly enforcing this rule breaks too much code.
llvm-svn: 254992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
side-effect, so that we don't allow speculative evaluation of such expressions
during code generation.
This caused a diagnostic quality regression, so fix constant expression
diagnostics to prefer either the first "can't be constant folded" diagnostic or
the first "not a constant expression" diagnostic depending on the kind of
evaluation we're doing. This was always the intent, but didn't quite work
correctly before.
This results in certain initializers that used to be constant initializers to
no longer be; in particular, things like:
float f = 1e100;
are no longer accepted in C. This seems appropriate, as such constructs would
lead to code being executed if sanitizers are enabled.
llvm-svn: 254574
|
|
|
|
|
|
|
| |
This 2nd patch should not change the test results, but it is useful if clang's
default C++ language is ever changed from gnu++98.
llvm-svn: 246183
|
|
|
|
|
|
|
| |
implicit casts. Reviewed by Reid Kleckner.
rdar://18405357
llvm-svn: 219712
|
|
|
|
| |
llvm-svn: 177163
|
|
|
|
|
|
| |
for integer overflow. // rdar://13423975
llvm-svn: 177162
|
|
|
|
| |
llvm-svn: 173462
|
|
|
|
| |
llvm-svn: 173461
|
|
|
|
| |
llvm-svn: 173388
|
|
|
|
|
|
| |
commented on and approved by Richard Smith.
llvm-svn: 173377
|
|
|
|
|
|
|
| |
(which may yet change if we move the diagnostic
outside case value).
llvm-svn: 172242
|
|
|
|
|
|
| |
// rdar://11577384
llvm-svn: 172102
|
|
in case condition type. // rdar://11577384.
Test is conditionalized on x86_64-apple triple as
I am not sure if the INT_MAX/LONG_MAX values in the test
will pass this test for other hosts.
llvm-svn: 172016
|