aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/flexible-array-init.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-23Refactor and fix checking for initialization of flexible array members. The ↵Eli Friedman1-12/+23
old version had the checks scattered across the code, missed some checks, and had a couple nasty bugs in existing checks. Fixes PR10648 and another similar accepts-invalid bug. llvm-svn: 138398
2010-10-15Allow list-initialization of a local variable of class type with aDouglas Gregor1-2/+7
flexible array member, so long as the flexibility array member is either not initialized or is initialized with an empty initializer list. Fixes <rdar://problem/8540437>. llvm-svn: 116647
2010-10-10fix PR8217, a silent miscompilation of invalid code.Chris Lattner1-1/+18
llvm-svn: 116166
2009-12-15Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar1-1/+1
- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
2009-03-24Rename clang to clang-cc.Daniel Dunbar1-1/+1
Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
2009-03-20Allow flexible array initializers that are not surrounded byDouglas Gregor1-7/+7
braces. We now build the appropriate fully-structured initializer list for such things. Per PR3618, verified that we're getting the right code generation. llvm-svn: 67353
2009-02-18Downgrade the "excess elements in initializer" errors to warnings *inDouglas Gregor1-1/+1
C*. They're required errors in C++. llvm-svn: 64964
2009-02-10GNU allows structs with flexible array members to be placed insideDouglas Gregor1-6/+26
arrays and other structs/unions as an extension. Downgrade our error to a warning. Fixes PR3540. llvm-svn: 64239
2009-02-07Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl1-1/+1
This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
2009-02-04Implement semantic analysis for the GNU flexible array initializationDouglas Gregor1-0/+38
extension. The interaction with designated initializers is a bit... interesting... but we follow GNU's lead and don't permit too much crazy code in this area. Also, make the "excess initializers" error message a bit more informative. Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561 llvm-svn: 63785