forked from OSchip/llvm-project
0c6124ba82
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 |
||
---|---|---|
.. | ||
expr.ass | ||
expr.cast | ||
expr.const | ||
expr.mptr.oper | ||
expr.post | ||
expr.prim | ||
expr.unary | ||
p3.cpp | ||
p8.cpp | ||
p9.cpp | ||
p10-0x.cpp |