summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/complex-init-list.c
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly permit undefined behavior in constant initializers for globalRichard Smith2015-12-081-2/+2
| | | | | | | | 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
* PR17381: Treat undefined behavior during expression evaluation as an unmodeledRichard Smith2015-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | 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
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-2/+2
| | | | | | tests fail. llvm-svn: 188447
* Add missing code for compound literals of complex type. ↵Eli Friedman2012-02-271-1/+7
| | | | | | <rdar://problem/10938628> llvm-svn: 151549
* Add list initialization for complex numbers in C. Essentially, this allows ↵Eli Friedman2011-09-191-0/+12
"_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description. <rdar://problem/9397672>. llvm-svn: 140090
OpenPOWER on IntegriCloud