llvm-project/clang/test/CXX/expr
Richard Smith 0c6124ba82 PR17381: Treat undefined behavior during expression evaluation as an unmodeled
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
2015-12-03 01:36:22 +00:00
..
expr.ass The 'constexpr implies const' rule for non-static member functions is gone in 2013-04-21 01:08:50 +00:00
expr.cast
expr.const PR17381: Treat undefined behavior during expression evaluation as an unmodeled 2015-12-03 01:36:22 +00:00
expr.mptr.oper Revert "Don't require -re suffix on -verify directives with regexes." 2013-12-14 01:07:05 +00:00
expr.post sizeof(void) etc. should be a hard error in C++. 2013-08-13 22:26:42 +00:00
expr.prim N3922: direct-list-initialization of an auto-typed variable no longer deduces a 2015-11-11 01:36:17 +00:00
expr.unary [Sema] Be consistent about diagnostic wording: always use "cannot". 2015-08-15 15:23:14 +00:00
p3.cpp
p8.cpp
p9.cpp
p10-0x.cpp Update Clang tests to handle explicitly typed load changes in LLVM. 2015-02-27 21:19:58 +00:00