summaryrefslogtreecommitdiff
path: root/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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254992 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254574 91177308-0d34-0410-b5e6-96231b3b80d8
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-2/+2
| | | | | | tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing code for compound literals of complex type. ↵Eli Friedman2012-02-271-1/+7
| | | | | | <rdar://problem/10938628> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151549 91177308-0d34-0410-b5e6-96231b3b80d8
* 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>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8