- Sep 04, 2007
-
-
Chris Lattner authored
llvm-svn: 41692
-
Chris Lattner authored
llvm-svn: 41691
-
Steve Naroff authored
More fun with initializers! - 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
-
- Sep 03, 2007
-
-
Chris Lattner authored
llvm-svn: 41688
-
Chris Lattner authored
llvm-svn: 41687
-
Chris Lattner authored
llvm-svn: 41686
-
Chris Lattner authored
llvm-svn: 41685
-
Chris Lattner authored
by Hartmut Kaiser! llvm-svn: 41684
-
Chris Lattner authored
Hartmut Kaiser! llvm-svn: 41683
-
Steve Naroff authored
Finish getting "array-init.c" to work properly. Array scalar initialization is now is reasonable shape. Next step, structure and array of structure initializers. llvm-svn: 41681
-
- Sep 02, 2007
-
-
Steve Naroff authored
More progress on array initializers. - Added Expr::isConstantExpr(). - Added type checking for InitListExpr elements. - Added diagnostic for trying to initialize a variable sized object. llvm-svn: 41674
-
Steve Naroff authored
Added 2 errors and one warning, updated test case. llvm-svn: 41672
-
Steve Naroff authored
Start implementing semantic analysis for C initializers. 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
-
- Sep 01, 2007
-
-
Steve Naroff authored
Finish converting SwitchStmt AST to source ranges. Move DumpSourceRange() to DumpStmt(). Now -parse-ast-dump will display source range info for all stmts/exprs. One day we should implement the source range protocol for Decls. llvm-svn: 41670
-
Fariborz Jahanian authored
objc2's @synthesize and @dynamic. llvm-svn: 41667
-
Steve Naroff authored
Convert more statments over to SourceRanges... llvm-svn: 41666
-
Steve Naroff authored
Move SourceRange protocol from Expr->Stmt. Converted many of the statements over. Still a hanful left... llvm-svn: 41663
-
Chris Lattner authored
llvm-svn: 41662
-
Chris Lattner authored
llvm-svn: 41661
-
Chris Lattner authored
support any sort of expr, add a new EmitAnyExpr routine. llvm-svn: 41660
-
Ted Kremenek authored
statement expressions. llvm-svn: 41659
-
Ted Kremenek authored
llvm-svn: 41658
-
Ted Kremenek authored
llvm-svn: 41657
-
Chris Lattner authored
llvm-svn: 41656
-
- Aug 31, 2007
-
-
Chris Lattner authored
warn about the last stmt in a stmtexpr, f.e. there should be no warning for: int maxval_stmt_expr(int x, int y) { return ({int _a = x, _b = y; _a > _b ? _a : _b; }); } llvm-svn: 41655
-
Ted Kremenek authored
llvm-svn: 41654
-
Chris Lattner authored
llvm-svn: 41653
-
Chris Lattner authored
llvm-svn: 41652
-
Ted Kremenek authored
be passed as an (optional) argument to StmtPrinter to customize printing of AST nodes. Used new PrinterHelper interface to enhance printing and visualization of CFGs. The CFGs now illustrate the semantic connectives between statements and terminators, wheras in the previous printing certain expressions would (visible) be printed multiple times to reflect which expressions used the results of other expressions. The end result is that the CFG is easier to read for flow of expression values (following principles similar to the LLVM IR). llvm-svn: 41651
-
Ted Kremenek authored
llvm-svn: 41648
-
Steve Naroff authored
Removed Sema::VerifyConstantArrayType(). With the new Array/ConstantArray/VariableArray nodes, this routine was causing more trouble than it was worth. Anders/Chris noticed that it could return an error code without emiting a diagnostic (which results in an silent invalid decl, which should *never* happen). In addition, this routine didn't work well for typedefs and field decls. Lastly, it didn't consider that initializers aren't in place yet. Added Type::getAsConstantArrayType(), Type::getAsVariableArrayType(), Type::getAsVariablyModifiedType(), and Type::isVariablyModifiedType(); Modified Sema::ParseDeclarator() and Sema::ParseField() to use the new predicates. Also added a FIXME for the initializer omission. Also added a missing test for "static" @ file scope. llvm-svn: 41647
-
Ted Kremenek authored
llvm-svn: 41646
-
Fariborz Jahanian authored
Log: Implement parsing of objective-c's new @property declaration. Modified: include/clang/Basic/DiagnosticKinds.def include/clang/Parse/Parser.h Parse/ParseObjc.cpp Parse/Parser.cpp llvm-svn: 41644
-
Chris Lattner authored
llvm-svn: 41638
-
Chris Lattner authored
llvm-svn: 41637
-
Anders Carlsson authored
llvm-svn: 41636
-
Chris Lattner authored
llvm-svn: 41635
-
Chris Lattner authored
to their corresponding library routines (e.g. isinf). This allows us to handle all the stuff in macos math.h, and other stuff as it's added to *Builtins.def. llvm-svn: 41634
-
Chris Lattner authored
llvm-svn: 41633
-
Chris Lattner authored
llvm-svn: 41631
-