summaryrefslogtreecommitdiffstats
path: root/clang/AST
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-1518-10467/+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
* move the ASTContext argument to be first in the argument list of Chris Lattner2008-03-152-21/+22
| | | | | | all Create methods. llvm-svn: 48398
* Switch over functiondecl. This makes it obvious that the ASTContextChris Lattner2008-03-152-1/+10
| | | | | | argument to Create should be first, not last. llvm-svn: 48397
* switch the VarDecl allocation model to go through ASTContext.Chris Lattner2008-03-151-0/+22
| | | | llvm-svn: 48396
* Small bug fix in CFG construction: the active block for LabelStmts comes Ted Kremenek2008-03-151-2/+3
| | | | | | from "Block", not the CFGBlock* returned from visiting its subexpression. llvm-svn: 48392
* start switching decls over to using an allocator controlled by ASTContext. Chris Lattner2008-03-152-4/+35
| | | | | | | | | | Right now only some ctors are switched over. I need to switch them all over so I can change the dtor over. This lets us experiment with region allocation and other things in the future. llvm-svn: 48390
* various minor cleanups.Chris Lattner2008-03-151-112/+63
| | | | llvm-svn: 48389
* improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner2008-03-131-1/+5
| | | | | | | Set the start of DeclStmt range. Right now the end is meaningless though. llvm-svn: 48330
* Added bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:Ted Kremenek2008-03-131-0/+21
| | | | | | | | | | we gracefully back out and return NULL for the CFG, allowing clients to skip analyzing functions with these CFGs. We will add support later. Modified base ASTConsumer "CFGVisitor" to detect when a CFG is not constructed and to emit a warning. llvm-svn: 48322
* -Add missing visitor for ObjCIvarRefExpr.Steve Naroff2008-03-121-0/+8
| | | | | | -Wrap objc runtime calls with "extern "C"" (for now). llvm-svn: 48284
* Add some missing #includes for GCC mainline, patch by Shantonu Sen!Chris Lattner2008-03-101-1/+1
| | | | llvm-svn: 48153
* simplify all the type info accessors in TargeTInfo to return scalars,Chris Lattner2008-03-081-20/+27
| | | | | | which is simpler to use and provide. llvm-svn: 48051
* Fix a fixme by allowing pointers in different address spaces to haveChris Lattner2008-03-081-2/+8
| | | | | | different widths. Start simplifying TargetInfo accessor methods. llvm-svn: 48050
* fix typosGabor Greif2008-03-062-2/+2
| | | | llvm-svn: 47995
* remove the source location arguments to various target query methods.Chris Lattner2008-03-052-72/+48
| | | | llvm-svn: 47954
* Remove the first layer of support for "portability" warnings. This is Chris Lattner2008-03-052-11/+4
| | | | | | | | | | | | | | | theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. llvm-svn: 47930
* CallExprs are now no longer block-level expressions in the CFG by construction.Ted Kremenek2008-03-041-12/+0
| | | | llvm-svn: 47913
* Minor CFG optimization: don't create separate block-level expressions for ↵Ted Kremenek2008-02-291-1/+14
| | | | | | DeclStmt initializers when the initializer is a literal. llvm-svn: 47771
* When AST-dumping ObjCMessageExpr, output the selector.Ted Kremenek2008-02-291-0/+6
| | | | llvm-svn: 47769
* Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())Ted Kremenek2008-02-271-8/+8
| | | | | | | | | | | Removed VarDecl::hasAutoStorage() (only used by hasLocalStorage()) Merged logic from VarDecl::hasAutoStorage() into VarDecl::hasLocalStorage(), and expanded (fixed) the logic of hasLocalStorage() to handle Extern and PrivateExtern. Renamed Expr::hasStaticStorage() to Expr::hasGlobalStorage(). llvm-svn: 47681
* Fixed edge-case in CFG construction where goto jumps would not always getTed Kremenek2008-02-271-1/+4
| | | | | | properly back-patched. llvm-svn: 47675
* Bug fix in CFG construction: Properly register the loop head as the implicitTed Kremenek2008-02-271-3/+4
| | | | | | successor of blocks created above it. llvm-svn: 47666
* Fixed CFG construction bug that occurred when a condition for a loop spannedTed Kremenek2008-02-271-3/+4
| | | | | | | | multiple basic blocks (which can happen when they contain '&&', '||', '?'). The bug was that the loop backedge when to the last block in the loop condition, not the first. llvm-svn: 47649
* Do include ParenExpr in the CFG; only include their subexpression.Ted Kremenek2008-02-261-0/+3
| | | | llvm-svn: 47588
* add parsing, ast building and pretty printing support for C++ throw expressions.Chris Lattner2008-02-262-1/+20
| | | | | | Patch by Mike Stump! llvm-svn: 47582
* Fixed bug in CFG construction when a CompoundStmt ended with a NullStmt.Ted Kremenek2008-02-261-10/+6
| | | | | | This caused the whole body to get dropped from the CFG. llvm-svn: 47579
* Fix a little typo... per cfe-dev, this was apparently causing test Eli Friedman2008-02-251-1/+1
| | | | | | failures on OS X in some cases. (Thank you valgrind.) llvm-svn: 47568
* convert tabs to spaces, patch by Mike Stump!Chris Lattner2008-02-251-46/+46
| | | | llvm-svn: 47560
* Minor code cleanup.Eli Friedman2008-02-231-5/+2
| | | | llvm-svn: 47530
* Patch from Argiris Kirtzidis:Ted Kremenek2008-02-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | The patch fixes some debug assertions that the msvcrt throws: 1) - if (isprint(value) && value < 256) { + if (value < 256 && isprint(value)) { isprint() does an assertion check of its own for value < 256; check value before calling it to prevent it. 2) - Stmt->Names.push_back(std::string(&data[0], data.size())); + if (data.size() == 0) + Stmt->Names.push_back(std::string()); + else + Stmt->Names.push_back(std::string(&data[0], data.size())); If data.size() == 0 then data[0] throws "out of range" assertion. llvm-svn: 47512
* Change variable name to Tq (from TQ)Gabor Greif2008-02-211-2/+2
| | | | | | | | | because silly gcc 3.4.6 barfs on this construct. Type.h defines an "enum TQ", which makes the parser to err. llvm-svn: 47438
* implement codegen support for sizeof(void), fixing PR2080.Chris Lattner2008-02-211-11/+25
| | | | llvm-svn: 47429
* Alternate address spaces work:Chris Lattner2008-02-204-14/+30
| | | | | | | | | rename QualType::getQualifiers to getCVRQualifiers. Add some fixme's and clean up some code relevant to qualifiers. Change ASQualType to contain a Type* instead of a QualType. Any CVR qualifiers should be on the outer qual type. llvm-svn: 47398
* Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs.Steve Naroff2008-02-181-1/+1
| | | | llvm-svn: 47269
* More bitfield improvements.Anders Carlsson2008-02-181-19/+53
| | | | llvm-svn: 47260
* Fix bug where we would report the wrong value for __alignof__ with an expr ↵Anders Carlsson2008-02-181-5/+6
| | | | | | that is not a type. llvm-svn: 47259
* Implemnt isVariablyModifiedType correctly.Eli Friedman2008-02-171-6/+22
| | | | llvm-svn: 47233
* Better handling of the aligned attribute.Anders Carlsson2008-02-161-3/+19
| | | | llvm-svn: 47216
* More comments from Chris.Anders Carlsson2008-02-161-12/+12
| | | | llvm-svn: 47210
* Make sizeof and __alignof work correctly with packed structs.Anders Carlsson2008-02-162-8/+13
| | | | llvm-svn: 47202
* Store attributes in a global hash map instead.Anders Carlsson2008-02-151-6/+41
| | | | llvm-svn: 47191
* Split out incomplete arrays from VariableArrayType into Eli Friedman2008-02-153-63/+92
| | | | | | | | | | IncompleteArrayType. This should make code dealing with both incomplete and variable length arrays much more readable, plus it allows properly making the distinction between isVariableArrayType() and isVariablyModifiedType(). The patch is a little big, but it's strightforward. so I don't think there should be any issues. llvm-svn: 47165
* Remove useless parameter from isConstantSizeType.Eli Friedman2008-02-152-6/+6
| | | | llvm-svn: 47156
* Get rid of AttributeList in the AST and use the new Attr class insteadAnders Carlsson2008-02-151-0/+6
| | | | llvm-svn: 47155
* Partial fix for struct compatibility; there's still something messy Eli Friedman2008-02-151-12/+4
| | | | | | going on with mixing scopes, though. llvm-svn: 47152
* When creating the CFGBlocks for a switch statement, we now have the "default"Ted Kremenek2008-02-131-18/+41
| | | | | | | | | | | | | | | | | | | | | | branch ALWAYS be the last successor for a switch-terminated block. This allows clients to distinguish cases like the following: switch(...) case XXX: switch(...) { case YYY: ... } case ZZZ: .. } In this case, the block with "case ZZZ:" is the default block for the inner switch statement, but that case is associated with the outer switch statement, and not the inner one. Clients can test for this behavior by checking if a successor block is the last one (and thus just assume that this is the "default" case). llvm-svn: 47088
* Fixed bug in CFG construction when processing switch statements that contain noTed Kremenek2008-02-131-0/+16
| | | | | | | | "default" case. In such cases, we now correctly add the CFGBlock representing the code after the switch statement as a successor to the block terminated by the switch statement. llvm-svn: 47087
* Fix a minor bug in isNullPointerConstant triggered by the linux Eli Friedman2008-02-131-1/+1
| | | | | | | | | tgmath.h. Note that there is another issue with tgmath.h, so mandel.c still doesn't work. llvm-svn: 47069
* Move IgnoreParenCasts to be a method on Expr.Chris Lattner2008-02-131-0/+17
| | | | llvm-svn: 47040
* Make typechecking for enum+int compatibility stricter.Eli Friedman2008-02-121-4/+8
| | | | llvm-svn: 47005
OpenPOWER on IntegriCloud