summaryrefslogtreecommitdiffstats
path: root/clang/AST/StmtDumper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-486/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* -Add missing visitor for ObjCIvarRefExpr.Steve Naroff2008-03-121-0/+8
| | | | | | -Wrap objc runtime calls with "extern "C"" (for now). llvm-svn: 48284
* When AST-dumping ObjCMessageExpr, output the selector.Ted Kremenek2008-02-291-0/+6
| | | | llvm-svn: 47769
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-2/+2
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Added back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:Ted Kremenek2007-12-121-9/+28
| | | | | | | | | | | | | http://llvm.org/viewvc/llvm-project?rev=44920&view=rev Putting VisitDeclStmt() was motivated because it called DumpDeclarator(), which printed out a little bit more information than just using the child_iterator interface to visit the subexpressions of DeclStmt. To avoid printing the initializers twice, DumpSubTree() now specially checks for DeclStmts; in such cases it calls VisitDeclStmt() without using the child_iterators to visit the subexpressions. llvm-svn: 44924
* Removed VisitDeclStmt(). The initializers of a DeclStmt are now automaticallyTed Kremenek2007-12-121-15/+0
| | | | | | | printed out by DumpSubTree() via the child_iterator interface. This fixes a bug where the initializers were being dumped twice. llvm-svn: 44920
* Now that we are passing back "free standing decls", make sure -ast-dump ↵Steve Naroff2007-11-171-1/+9
| | | | | | | | works like -ast-print. Also added a cast to be safe... llvm-svn: 44209
* Fixed includes of "clang/AST/DeclObjC.h" to work on case-sensitiveTed Kremenek2007-10-171-1/+1
| | | | | | | filesystems (was "#include "clang/AST/DeclObjc.h", which worked fine on a case-insensitive HFS+ volume on the Mac). llvm-svn: 43080
* Implementation of AST for @protocol expression.Fariborz Jahanian2007-10-171-0/+8
| | | | llvm-svn: 43075
* Add a new Rewriter::getRangeSize method.Chris Lattner2007-10-161-3/+3
| | | | | | | | Rename SourceRange::Begin()/End() to getBegin()/getEnd() for consistency with other code. Start building the rewriter towards handling @encode. llvm-svn: 43047
* Steve, pointer out that getName() is available for selectors. Made code much ↵Fariborz Jahanian2007-10-161-9/+1
| | | | | | smaller, thanks. llvm-svn: 43042
* Fix problem dumping/printing method names with null selector.Fariborz Jahanian2007-10-161-1/+4
| | | | llvm-svn: 43039
* Patch to implement AST generation for objective-c's @selector expression.Fariborz Jahanian2007-10-161-0/+14
| | | | llvm-svn: 43038
* Rename FileVariable -> FileVar for consistency with its class name, Chris Lattner2007-10-081-3/+3
| | | | | | | | | likewise block and param. Reorder the layout of the Decl kind enum so that the inheritance tree is reflected in the ordering. This allows trivial range comparisons to determine whether something is an instance of some abstract class, making classof faster. llvm-svn: 42772
* move IdentifierTable.h from liblex to libbasic.Chris Lattner2007-10-071-1/+1
| | | | llvm-svn: 42730
* further apfloat'ize the front-end, allowing codegen to pass Chris Lattner2007-09-221-1/+1
| | | | | | APFloat straight through to LLVM now. llvm-svn: 42236
* Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.Steve Naroff2007-09-131-1/+1
| | | | | | Decl is now svelte:-) llvm-svn: 41935
* Modified dumping of Decl information to including the Decl type.Ted Kremenek2007-09-101-2/+19
| | | | llvm-svn: 41796
* Finish converting SwitchStmt AST to source ranges.Steve Naroff2007-09-011-10/+6
| | | | | | | | | | 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
* Teach the stmtdumper to dump location/range info when a SourceMgr is available.Chris Lattner2007-08-301-6/+64
| | | | | | | | | | | | | | | | | | | | | 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
* Previous commit should have been:Chris Lattner2007-08-301-102/+30
| | | | | | | | | | | | 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
* elimiante some virtual calls.Chris Lattner2007-08-301-155/+31
| | | | llvm-svn: 41589
* Allow a SourceManager to optionally be passed into Stmt::dumpChris Lattner2007-08-301-4/+21
| | | | llvm-svn: 41588
* null pointers don't get an extra newline.Chris Lattner2007-08-261-1/+1
| | | | llvm-svn: 41415
* add a new ImaginaryLiteral AST node that is used toChris Lattner2007-08-261-0/+8
| | | | | | | | | | | | | | | | | | represent imaginary literals: float _Complex A; void foo() { A = 1.0iF; } generates: (BinaryOperator 0x2305ec0 '_Complex float' '=' (DeclRefExpr 0x2305e60 '_Complex float' Decl='A' 0x2305cf0) (ImaginaryLiteral 0x2305f40 '_Complex float' (FloatingLiteral 0x2305ea0 'float' 1.000000)))) llvm-svn: 41413
* Split the ASTNode out for compound assignments out from binary operators. NowChris Lattner2007-08-251-5/+11
| | | | | | they show up in dumps etc. llvm-svn: 41393
* print the computation type for compound assignment operators in dumps.Chris Lattner2007-08-241-1/+6
| | | | llvm-svn: 41361
* Parse @encode expressions.Anders Carlsson2007-08-221-0/+8
| | | | llvm-svn: 41273
* Implement parsing and code generation of Objective-C string literals.Anders Carlsson2007-08-211-0/+10
| | | | llvm-svn: 41238
* Switch StmtVisitor from using dynamic to static dispatch. This makes it Chris Lattner2007-08-211-6/+6
| | | | | | | significantly faster and actually reduces the amount of code in the system. This also allows for future visitor changes. llvm-svn: 41211
* Modified ArraySubscriptExpr to have accessors getLHS and getRHS in additionTed Kremenek2007-08-201-2/+2
| | | | | | | | | | | | | to getBase and getIdx. getBase and getIdx now return a "normalized" view of the expression (e.g., always "A[4]" instead of possibly "4[A]"). getLHS and getRHS return the expressions with syntactic fidelity to the original source code. Also modified client code of ArraySubscriptExpr, including the AST dumper and pretty printer, the return-stack value checker, and the LLVM code generator. llvm-svn: 41180
* make sure to add a newline at the end of the dumpChris Lattner2007-08-101-0/+2
| | | | llvm-svn: 41011
* implement dumper support for declstmt's. The dumper is now "done".Chris Lattner2007-08-091-25/+31
| | | | llvm-svn: 40969
* implement dumper support for the rest of expressions.Chris Lattner2007-08-091-75/+54
| | | | llvm-svn: 40968
* dump strings with escapes and other stuff in them nicely.Chris Lattner2007-08-091-16/+15
| | | | llvm-svn: 40964
* add dumping support for some new nodesChris Lattner2007-08-091-59/+15
| | | | llvm-svn: 40959
* Dump out types for expressions, and handle typedefs nicely. Chris Lattner2007-08-091-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | This allows us to dump: typedef short S; int test(S X, long long Y) { return X < ((100)); } as: typedef short S; int test(S X, long long Y) (CompoundStmt 0x2905d40 (ReturnStmt 0x2905d30 (BinaryOperator 0x2905d10 'int' '<' (ImplicitCastExpr 0x2905d00 'int' (DeclRefExpr 0x2905c80 'S':'short' Decl='X' 0x2905c20)) (ParenExpr 0x2905ce0 'int' (ParenExpr 0x2905cc0 'int' (IntegerLiteral 0x2905ca0 'int' 100)))))) llvm-svn: 40956
* add a new AST dumper interface (E->dump()). This dumps outChris Lattner2007-08-081-0/+562
the AST in a structural, non-pretty, form useful for understanding the AST. It isn't quite done yet, but is already somewhat useful. For this example: int test(short X, long long Y) { return X < ((100)); } we get (with -parse-ast-dump): int test(short X, long long Y) (CompoundStmt 0x2905ce0 (ReturnStmt 0x2905cd0 (BinaryOperator 0x2905cb0 '<' (ImplicitCastExpr 0x2905ca0 (DeclRefExpr 0x2905c20 Decl='X' 0x2905bb0)) (ParenExpr 0x2905c80 (ParenExpr 0x2905c60 (IntegerLiteral 0x2905c40 100)))))) llvm-svn: 40954
OpenPOWER on IntegriCloud