summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/array-init.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed option "-parse-ast-check" from clang driver. This is now implementedTed Kremenek2007-09-261-1/+1
| | | | | | | | | | | | using "-parse-ast -verify". Updated all test cases (using a sed script) that invoked -parse-ast-check to now use -parse-ast -verify. Fixed a bug where using "-verify" instead of "-parse-ast-check" would not correctly create the DiagClient needed to accumulate diagnostics. llvm-svn: 42365
* Remove a FIXME. Replace a couple asserts with an appropriate errorSteve Naroff2007-09-121-0/+4
| | | | | | diagnostic for illegal initializers. llvm-svn: 41889
* More fun with initializers! Steve Naroff2007-09-041-1/+83
| | | | | | | | | - Fixed many bugs, enhanced test case considerably, added a diagnostic, etc. - Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList(). - Added CheckInitExpr(). - Support for multi-dimensional arrays looking good. llvm-svn: 41690
* Finish getting "array-init.c" to work properly.Steve Naroff2007-09-031-3/+11
| | | | | | | | Array scalar initialization is now is reasonable shape. Next step, structure and array of structure initializers. llvm-svn: 41681
* More progress on array initializers.Steve Naroff2007-09-021-1/+5
| | | | | | | | - Added Expr::isConstantExpr(). - Added type checking for InitListExpr elements. - Added diagnostic for trying to initialize a variable sized object. llvm-svn: 41674
* More semantic analysis of initializers.Steve Naroff2007-09-021-0/+9
| | | | | | Added 2 errors and one warning, updated test case. llvm-svn: 41672
* Start implementing semantic analysis for C initializers.Steve Naroff2007-09-021-0/+27
Step 1: Start instantiating InitListExpr's. Step 2: Call newly added function Sema::CheckInitializer() from Sema::ParseDeclarator(). Step 3: Give InitListExpr's a preliminary type. Step 4: Start emitting diagnostics for simple assignments. Note: As a result of step 1, the CodeGen/mandel.c test asserts "Unimplemented agg expr!", which is expected. As a result of step 4, the test below now fails. This isn't expected and needs to be investigated (it appears type checking for C++ references is flawed in some way). ******************** TEST 'Sema/cxx-references.cpp' FAILED! ******************** Command: clang -fsyntax-only Sema/cxx-references.cpp Output: Sema/cxx-references.cpp:8:12: warning: incompatible pointer types assigning 'int &*' to 'int *' int *p = &r; ^~ Sema/cxx-references.cpp:10:20: error: incompatible types assigning 'int (int)' to 'int (&)(int)' int (&rg)(int) = g; ^ Sema/cxx-references.cpp:13:18: error: incompatible types assigning 'int [3]' to 'int (&)[3]' int (&ra)[3] = a; ^ Sema/cxx-references.cpp:16:14: error: incompatible types assigning 'int *' to 'int *&' int *& P = Q; ^ 4 diagnostics generated. ******************** TEST 'Sema/cxx-references.cpp' FAILED! ******************** llvm-svn: 41671
OpenPOWER on IntegriCloud