- Aug 31, 2007
-
-
Chris Lattner authored
llvm-svn: 41631
-
Steve Naroff authored
The following case now works... void empty(void * a ) {} void test() { unsigned char A[4]; empty( (void *) A); } Thanks to Patrick Flannery for finding this... llvm-svn: 41630
-
Steve Naroff authored
Final phase of array cleanup (for now), removing a FIXME from yesterday. Moved several array constraints checks from Sema::VerifyConstantArrayType() to Sema::GetTypeForDeclarator(). VerifyConstantArrayType() is now very simple, and could be removed eventually. Now, we get the following (correct) messages for BlockVarDecls:-) [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -pedantic x.c:4:20: error: size of array has non-integer type 'float' int size_not_int[f]; ^ x.c:5:21: error: array size is negative int negative_size[1-2]; ^~~ x.c:6:17: warning: zero size arrays are an extension int zero_size[0]; ^ 3 diagnostics generated. llvm-svn: 41624
-
- Aug 30, 2007
-
-
Ted Kremenek authored
llvm-svn: 41623
-
Ted Kremenek authored
introduced by moving "CaseStmt" pointers out of the list of statements and into the explicit "label" associated with a CFGBlock. --This line, and those below, will be ignored-- M AST/CFG.cpp llvm-svn: 41622
-
Steve Naroff authored
llvm-svn: 41621
-
Ted Kremenek authored
no statements (or just full of ';' statements). llvm-svn: 41620
-
Ted Kremenek authored
blocks involving only ';' statements. We now correctly handle the following: void empty_label() { l1: ; } llvm-svn: 41619
-
Steve Naroff authored
llvm-svn: 41618
-
Ted Kremenek authored
an empty then or else block (or contained only ';' statements). For example, we now handle the following: int empty_else() { if (0) { int a; } else ; } int empty_then() { if (0) ; else { int a; } } Thanks to Nico Weber for spotting this problem. llvm-svn: 41617
-
Steve Naroff authored
Refactored Array/VariableArray, moving SizeModifier/IndexTypeQuals back up to Array. These attributes are not specific to VLA's. Most of them are specific to array parameter types. llvm-svn: 41616
-
Chris Lattner authored
llvm-svn: 41615
-
Chris Lattner authored
llvm-svn: 41614
-
Chris Lattner authored
llvm-svn: 41613
-
Chris Lattner authored
llvm-svn: 41612
-
Chris Lattner authored
llvm-svn: 41611
-
Ted Kremenek authored
including the expressions in the case statement itself (not the body of the case). This required moving SubStmt out of SwitchCase into CaseStmt and DefaultStmt respectively. getSubStmt() now is a virtual call for SwitchCase, but is a direct (static) call for CaseStmt and DefaultStmt. llvm-svn: 41609
-
Chris Lattner authored
primary expressions. llvm-svn: 41607
-
Chris Lattner authored
llvm-svn: 41606
-
Chris Lattner authored
Test this the hard way. llvm-svn: 41605
-
Chris Lattner authored
to turn off all lexer-related warnings. llvm-svn: 41604
-
Chris Lattner authored
llvm-svn: 41603
-
Chris Lattner authored
For example, -parse-ast-dump now prints: static inline int __inline_isinff(float __x) (CompoundStmt 0x2409a20 (ReturnStmt 0x2409a10 (BinaryOperator 0x24099f0 'int' <///usr/include/architecture/i386/math.h:183:63, col:102> '==' (CallExpr 0x24098f0 'float' <col:63, col:82> (ImplicitCastExpr 0x24098e0 'float (*)(float)' <col:63> (DeclRefExpr 0x2409880 'float (float)' <col:63> Decl='__builtin_fabsf' 0x2409840)) (DeclRefExpr 0x24098a0 'float' <col:79> Decl='__x' 0x2409810)) (CallExpr 0x24099c0 'float' <col:87, col:102> (ImplicitCastExpr 0x2409870 'float (*)(void)' <col:87> (DeclRefExpr 0x2409980 'float (void)' <col:87> Decl='__builtin_inff' 0x2409940)))))) where it only prints filename/line# if it changes from the previous value. We really need loc info on stmts though, like we have on exprs. llvm-svn: 41602
-
Chris Lattner authored
to test for the right type class. llvm-svn: 41601
-
Chris Lattner authored
llvm-svn: 41600
-
Steve Naroff authored
Fix the following redefinition errors submitted by Keith Bauer... [dylan:~/llvm/tools/clang] admin% cat tentative_decls.c // incorrectly generates redefinition error extern int array[3]; int array[3]; // incorrectly generates a redefinition error extern void nup(int a[3]); void nup(int a[3]) {} It turns out that this exposed a fairly major flaw in the type system, array types were never getting uniqued! This is because all array types contained an expression, which aren't unique. To solve this, we now have 2 array types, ConstantArrayType and VariableArrayType. ConstantArrayType's are unique, VAT's aren't. This is a fairly extensive set of fundamental changes. Fortunately, all the tests pass. Nevertheless, there may be some collateral damage:-) If so, let me know! llvm-svn: 41592
-
Chris Lattner authored
Use Ted's child walking interface to allow the dumper to walk the tree in one place and only have node-specific callbacks worry about formatting the nodes (instead of formatting the nodes plus walking the tree). This commit eliminates now default cases by letting them fall through with the normal visitor stuff. llvm-svn: 41591
-
Chris Lattner authored
llvm-svn: 41589
-
Chris Lattner authored
llvm-svn: 41588
-
Ted Kremenek authored
llvm-svn: 41586
-
Ted Kremenek authored
block begins with a label or case statement, CFGBlock::getLabel() will return the corresponding LabelStmt/CaseStmt/DefaultStmt. LabelStmts and SwitchCases no longer appear within the "executable" statements of a CFGBlock. More cleanups on visualization/pretty-printing of CFGs (less verbose). llvm-svn: 41585
-
Chris Lattner authored
llvm-svn: 41583
-
Neil Booth authored
llvm-svn: 41582
-
Neil Booth authored
llvm-svn: 41581
-
- Aug 29, 2007
-
-
Ted Kremenek authored
(LLVM-provided) graph algorithms such as DFS and graph visualization to work effortless on source-level CFGs. Further cleanup on pretty printing of CFGs. CFGBlock::dump and CFGBlock::print now take the parent CFG as an argument. This allows CFGBlocks to print their own appropriate label indicating whether or not they are the Entry/Exit/IndirectGotoBlock without the CFG::print routine doing it instead. Added Graphviz visualization for CFGs: CFG::viewCFG. This employs the GraphTraits just implemented. Added "-view-cfg" mode the to clang driver. This is identical to "-dump-cfg" except that it calls Graphviz to visualize the CFGs instead of dumping them to the terminal. llvm-svn: 41580
-
Ted Kremenek authored
This is the same functionality gcc provides via --Wfloat-equal. llvm-svn: 41574
-
Chris Lattner authored
to emit signed comparisons when needed for enum decl references. This implements test/CodeGen/enum.c. I think enums should be good now. llvm-svn: 41572
-
Chris Lattner authored
A small bit of codegen work is still pending. llvm-svn: 41571
-
Chris Lattner authored
llvm-svn: 41570
-
Chris Lattner authored
llvm-svn: 41564
-