summaryrefslogtreecommitdiffstats
path: root/clang/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Use APFloat for the representation of FP immediates, ask the targetChris Lattner2007-09-221-3/+4
| | | | | | for *which* apfloat to use for a particular type. llvm-svn: 42234
* This patch instantiates objects for forward protocols and in general handles ↵Fariborz Jahanian2007-09-211-0/+9
| | | | | | | | use of protocols referenced in @protocol declarations. llvm-svn: 42191
* Added support to clang driver to view ASTs using GraphViz. ThisTed Kremenek2007-09-191-0/+60
| | | | | | functionality is still preliminary. llvm-svn: 42152
* Remove SelectorTable/SelectorInfo, simply store all selectors in the central ↵Steve Naroff2007-09-192-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | IdentifierTable. Rationale: We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually). It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data: Two tables: *** Selector/Identifier Stats: # Selectors/Identifiers: 51635 Bytes allocated: 1999824 One table: *** Identifier Table Stats: # Identifiers: 49500 Bytes allocated: 1990316 llvm-svn: 42139
* Progress on message expressions...Steve Naroff2007-09-182-0/+67
| | | | | | | | | | | - Add ObjcMessageExpr AST node and associated constructors. - Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API. - Instantiate message expressions... - Replace alloca usage with SmallString. Next step, installing a correct type, among other tweaks... llvm-svn: 42116
* Patch for object creation and handling of category declarations.Fariborz Jahanian2007-09-181-1/+27
| | | | llvm-svn: 42104
* Patch to remove ObjcProtoMethodDecl and use ObjcMethodDeclFariborz Jahanian2007-09-171-2/+2
| | | | | | instead for @protocol method decls. llvm-svn: 42070
* Patch to add objective-c's @protocl type declaration.Fariborz Jahanian2007-09-171-0/+20
| | | | llvm-svn: 42060
* When building CFGs we now (unconditionally) add an empty CFGBlock to the CFGTed Kremenek2007-09-171-6/+6
| | | | | | | | to serve as the entry block. An empty entry block (just as with an empty exit block, which we already have) simplifies building analyses on top of CFGs with very little extra overhead. llvm-svn: 42031
* Add const to debug hook...Steve Naroff2007-09-171-1/+1
| | | | llvm-svn: 42025
* Add support for ObjC keyword selectors.Steve Naroff2007-09-172-4/+49
| | | | | | | | | | - Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable. - Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo(). - Add SelectorInfo slot to ObjcMethodDecl. - Add helper function to derive a SelectorInfo from ObjcKeywordInfo. Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's. llvm-svn: 42023
* Fixed unterminated string issue.Hartmut Kaiser2007-09-171-1/+1
| | | | llvm-svn: 42022
* make var in anon namespace static. Use \n instead of std::endl.Chris Lattner2007-09-171-4/+2
| | | | llvm-svn: 42020
* Silenced a VC++ warning.Hartmut Kaiser2007-09-161-1/+2
| | | | | | Updated VC++ project files. llvm-svn: 42015
* fix some warnings, patch by Justin HandvilleChris Lattner2007-09-161-0/+3
| | | | llvm-svn: 42010
* decl counting isn't implemented yet for objc. -stats probably crashes for it.Chris Lattner2007-09-161-0/+7
| | | | | | Patch by Justin Handville llvm-svn: 42009
* fix warning.Chris Lattner2007-09-161-1/+1
| | | | llvm-svn: 42006
* Fixes/tweaks that prevent "defaults-i.m" from compiling.Steve Naroff2007-09-161-0/+36
| | | | | | | - Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression). - Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node! llvm-svn: 42001
* Fixed a problem VC++ revealed in release mode. Please verify.Hartmut Kaiser2007-09-161-1/+1
| | | | llvm-svn: 41996
* Fixed two problems VC++ revealed in release mode. Please verify.Hartmut Kaiser2007-09-161-0/+4
| | | | llvm-svn: 41995
* pretty print some nodes more nicely.Chris Lattner2007-09-151-9/+28
| | | | llvm-svn: 41989
* Patch to store ivars into interface class object.Fariborz Jahanian2007-09-141-0/+12
| | | | llvm-svn: 41961
* Now that the dust has settled on the Decl refactoring, I noticed FieldDecl ↵Steve Naroff2007-09-141-1/+1
| | | | | | | | didn't need NextDeclarator. As a result, I'm removing it. Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%. llvm-svn: 41948
* Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.Steve Naroff2007-09-132-2/+2
| | | | | | Decl is now svelte:-) llvm-svn: 41935
* Phase 2 of making the Decl class more lightweight...Steve Naroff2007-09-131-1/+7
| | | | | | | | Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. llvm-svn: 41934
* Patch for building method declaration nodes. Also fixed a segfault in ↵Fariborz Jahanian2007-09-121-0/+16
| | | | | | | | cocoa.m due to use of @property. llvm-svn: 41880
* Added static method "CFG::hasImplicitControlFlow".Ted Kremenek2007-09-111-0/+24
| | | | | | | | | | | | | | | | | | | | | This method is used to determine if an expression contains implicit control-flow, and thus appears in a distinct statement slot in the CFG. For example: (1) x = ... ? ... ? ... logically becomes: (1) ... ? ... : ... (a unique statement slot for the ternary ?) (2) x = [E1] (where E1 is actually the ConditionalOperator*) A client of the CFG, when walking the statement at (2), will encounter E1. In this case, hasImplicitControlFlow(E1) == true, and the client will know that the expression E1 is explicitly placed into its own statement slot to capture the implicit control-flow it has. llvm-svn: 41868
* Fixed bug where ternary expressions and GCC-style conditional expressions Ted Kremenek2007-09-111-1/+18
| | | | | | | | | | where not reversing the order of their subexpression blocks. Added feature where CallExprs are placed in their own statement slot in a CFGBlock. Thus we have a designated "return site" within a CFGBlock when reasoning about function calls. llvm-svn: 41866
* get rid of ugly "warning: no newline at end of file"Gabor Greif2007-09-112-2/+2
| | | | | | warnings that some compilers diagnose llvm-svn: 41847
* Early patch to collect objective-c methods inserts them inFariborz Jahanian2007-09-101-0/+20
| | | | | | class object. llvm-svn: 41801
* Modified dumping of Decl information to including the Decl type.Ted Kremenek2007-09-101-2/+19
| | | | llvm-svn: 41796
* The goal of this commit is to get just enough Sema support to recognize ↵Steve Naroff2007-09-063-0/+20
| | | | | | | | | | | Objective-C classes as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very* preliminary. The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m. llvm-svn: 41752
* Moved tracking of CFG block IDs into the CFG class.Ted Kremenek2007-09-051-6/+4
| | | | | | Added CFG::getNumBlockIDs() to query the number of distinct block ids created. llvm-svn: 41724
* Silence VC++ warnings, patch by Hartmut KaiserChris Lattner2007-09-041-9/+18
| | | | llvm-svn: 41693
* More progress on array initializers.Steve Naroff2007-09-021-0/+114
| | | | | | | | - Added Expr::isConstantExpr(). - Added type checking for InitListExpr elements. - Added diagnostic for trying to initialize a variable sized object. llvm-svn: 41674
* 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
* Convert more statments over to SourceRanges...Steve Naroff2007-08-311-0/+8
| | | | llvm-svn: 41666
* Fixed missing '(' and ')' characters in (CFG) pretty-printing ofTed Kremenek2007-08-311-2/+2
| | | | | | statement expressions. llvm-svn: 41659
* Added better pretty printing in CFGs for __builtin_choose_exprTed Kremenek2007-08-311-0/+6
| | | | llvm-svn: 41658
* Further cleanups in CFG printing for comma expressions, statement ↵Ted Kremenek2007-08-311-10/+48
| | | | | | expressions, and indirect gotos. llvm-svn: 41657
* Cleanups for printing the terminators of CFGBlocks for "?", "||", and "&&" ↵Ted Kremenek2007-08-311-2/+28
| | | | | | operators. llvm-svn: 41654
* Added "PrinterHelper" interface (include/AST/PrinterHelper) that canTed Kremenek2007-08-312-83/+190
| | | | | | | | | | | | | | | | 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
* Removed Sema::VerifyConstantArrayType(). With the new ↵Steve Naroff2007-08-311-1/+43
| | | | | | | | | | | | | | | | | 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
* Added support for __builtin_choose_expr (ChooseExpr) in CFGs.Ted Kremenek2007-08-311-0/+22
| | | | llvm-svn: 41646
* Add InitListExpr class.Anders Carlsson2007-08-312-0/+29
| | | | llvm-svn: 41636
* Minor cleanups to pretty-printing for loops in CFGs.Ted Kremenek2007-08-301-4/+4
| | | | llvm-svn: 41623
* Fixed a bug in constructing CFG blocks for case statement fall-throughTed Kremenek2007-08-301-3/+5
| | | | | | | | | | 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
* Diff is self small & self explanatory...Steve Naroff2007-08-301-1/+1
| | | | llvm-svn: 41621
* Fixed bug in CFG construction where we failed to handle loop bodies withTed Kremenek2007-08-301-9/+18
| | | | | | no statements (or just full of ';' statements). llvm-svn: 41620
* Fixed bug in CFG construction involving use of labels and "empty"Ted Kremenek2007-08-301-2/+4
| | | | | | | | blocks involving only ';' statements. We now correctly handle the following: void empty_label() { l1: ; } llvm-svn: 41619
OpenPOWER on IntegriCloud