- Sep 05, 2007
-
-
Ted Kremenek authored
Added CFG::getNumBlockIDs() to query the number of distinct block ids created. llvm-svn: 41724
-
- Sep 04, 2007
-
-
Chris Lattner authored
llvm-svn: 41693
-
- 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
-
- 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
-
Steve Naroff authored
Convert more statments over to SourceRanges... llvm-svn: 41666
-
Ted Kremenek authored
statement expressions. llvm-svn: 41659
-
Ted Kremenek authored
llvm-svn: 41658
-
Ted Kremenek authored
llvm-svn: 41657
-
- Aug 31, 2007
-
-
Ted Kremenek authored
llvm-svn: 41654
-
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
-
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
-
Anders Carlsson authored
llvm-svn: 41636
-
- 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: 41613
-
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
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
-
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
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
-
- 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
-
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
-
Steve Naroff authored
This fixes the following bug submitted by Neil... const char *f (void) { return 0; } ...which would incorrectly warn with -pedantic enabled. llvm-svn: 41559
-
- Aug 28, 2007
-
-
Steve Naroff authored
This fixes the following (recent) regression noticed by Keith Bauer (thanks!). void func(void *a); main() { void *p; p = 0; func(0); } ...which now works as you would expect. llvm-svn: 41557
-
Ted Kremenek authored
This involves the construction of a specialized "dispatch" block that all basic blocks containing indirect gotos unconditionally transfer control-flow to. The successors of the dispatch block has as its successors all of the blocks containing labels whose address was taken somewhere in the function. llvm-svn: 41554
-
Ted Kremenek authored
llvm-svn: 41549
-
Chris Lattner authored
directly in it. Remove TargetInfo::getEnumPolicy, as there is only one policy that we support right now. llvm-svn: 41548
-
Ted Kremenek authored
arbitrarily complex control-flow in their subexpressions. llvm-svn: 41547
-
Ted Kremenek authored
llvm-svn: 41540
-