aboutsummaryrefslogtreecommitdiff
path: root/AST
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15move the ASTContext argument to be first in the argument list of Chris Lattner
all Create methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Switch over functiondecl. This makes it obvious that the ASTContextChris Lattner
argument to Create should be first, not last. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48397 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15switch the VarDecl allocation model to go through ASTContext.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48396 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Small bug fix in CFG construction: the active block for LabelStmts comes Ted Kremenek
from "Block", not the CFGBlock* returned from visiting its subexpression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48392 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15start switching decls over to using an allocator controlled by ASTContext. Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48390 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15various minor cleanups.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48389 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner
Set the start of DeclStmt range. Right now the end is meaningless though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13Added bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48322 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-12-Add missing visitor for ObjCIvarRefExpr.Steve Naroff
-Wrap objc runtime calls with "extern "C"" (for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48284 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10Add some missing #includes for GCC mainline, patch by Shantonu Sen!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48153 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08simplify all the type info accessors in TargeTInfo to return scalars,Chris Lattner
which is simpler to use and provide. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08Fix a fixme by allowing pointers in different address spaces to haveChris Lattner
different widths. Start simplifying TargetInfo accessor methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06fix typosGabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Remove the first layer of support for "portability" warnings. This is Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04CallExprs are now no longer block-level expressions in the CFG by construction.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29Minor CFG optimization: don't create separate block-level expressions for ↵Ted Kremenek
DeclStmt initializers when the initializer is a literal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47771 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29When AST-dumping ObjCMessageExpr, output the selector.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47769 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27Removed VarDecl::hasStaticStorage() (redundant with hasGlobalStorage())Ted Kremenek
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(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27Fixed edge-case in CFG construction where goto jumps would not always getTed Kremenek
properly back-patched. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47675 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27Bug fix in CFG construction: Properly register the loop head as the implicitTed Kremenek
successor of blocks created above it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27Fixed CFG construction bug that occurred when a condition for a loop spannedTed Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47649 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26Do include ParenExpr in the CFG; only include their subexpression.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47588 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26add parsing, ast building and pretty printing support for C++ throw expressions.Chris Lattner
Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26Fixed bug in CFG construction when a CompoundStmt ended with a NullStmt.Ted Kremenek
This caused the whole body to get dropped from the CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47579 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25Fix a little typo... per cfe-dev, this was apparently causing test Eli Friedman
failures on OS X in some cases. (Thank you valgrind.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25convert tabs to spaces, patch by Mike Stump!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23Minor code cleanup.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47530 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-23Patch from Argiris Kirtzidis:Ted Kremenek
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21Change variable name to Tq (from TQ)Gabor Greif
because silly gcc 3.4.6 barfs on this construct. Type.h defines an "enum TQ", which makes the parser to err. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47438 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21implement codegen support for sizeof(void), fixing PR2080.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47429 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Alternate address spaces work:Chris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47269 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18More bitfield improvements.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47260 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18Fix bug where we would report the wrong value for __alignof__ with an expr ↵Anders Carlsson
that is not a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Implemnt isVariablyModifiedType correctly.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47233 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Better handling of the aligned attribute.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47216 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16More comments from Chris.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Make sizeof and __alignof work correctly with packed structs.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47202 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Store attributes in a global hash map instead.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47191 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Split out incomplete arrays from VariableArrayType into Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Remove useless parameter from isConstantSizeType.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47156 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of AttributeList in the AST and use the new Attr class insteadAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Partial fix for struct compatibility; there's still something messy Eli Friedman
going on with mixing scopes, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47152 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13When creating the CFGBlocks for a switch statement, we now have the "default"Ted Kremenek
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47088 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Fixed bug in CFG construction when processing switch statements that contain noTed Kremenek
"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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47087 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Fix a minor bug in isNullPointerConstant triggered by the linux Eli Friedman
tgmath.h. Note that there is another issue with tgmath.h, so mandel.c still doesn't work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47069 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-13Move IgnoreParenCasts to be a method on Expr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Make typechecking for enum+int compatibility stricter.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47005 91177308-0d34-0410-b5e6-96231b3b80d8