summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderStmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use ASTVector instead of std::vector for the Exprs in InitListExpr. PerformanceTed Kremenek2010-04-131-3/+3
| | | | | | | measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance change, but now the vector isn't leaked. llvm-svn: 101195
* Extend ObjCMessageExpr for class method sends with the source locationDouglas Gregor2010-03-081-2/+3
| | | | | | of the class name. llvm-svn: 97943
* Revert: "Change InitListExpr to allocate the array for holding references"Ted Kremenek2010-02-191-2/+2
| | | | | | | | This was causing buildbot breakage. This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a. llvm-svn: 96652
* Change InitListExpr to allocate the array for holding referencesTed Kremenek2010-02-191-2/+2
| | | | | | | | | | | | | | | | to initializer expressions in an array allocated using ASTContext. This plugs a memory leak when ASTContext uses a BumpPtrAllocator to allocate memory for AST nodes. In my mind this isn't an ideal solution; it would be nice to have a general "vector"-like class that allocates memory using ASTContext, but whose guts could be separated from the methods of InitListExpr itself. I haven't gone and taken this approach yet because it isn't clear yet if we'll eventually want an alternate solution for recylcing memory using by InitListExprs as we are constructing the ASTs. llvm-svn: 96642
* Roll r95513 back in.Sam Weinig2010-02-071-0/+21
| | | | llvm-svn: 95515
* Roll out r95513, it seems to have broken self hosting.Sam Weinig2010-02-071-21/+0
| | | | llvm-svn: 95514
* Add PCH support for CXXBoolLiteralExpr and CXXNullPtrLiteralExpr.Sam Weinig2010-02-071-0/+21
| | | | llvm-svn: 95513
* Use IdentifierInfo * instead of std::string for the AsmStmt names.Anders Carlsson2010-01-301-2/+2
| | | | llvm-svn: 94925
* Even more AsmStmt cleanup.Anders Carlsson2010-01-301-1/+2
| | | | llvm-svn: 94921
* Combine AsmStmt::setOutputsAndInputs and AsmStmt::setClobbers.Anders Carlsson2010-01-301-3/+4
| | | | llvm-svn: 94918
* Preserve type source information in compound literal expressions.John McCall2010-01-181-0/+1
| | | | | | Patch by Enea Zaffanella! llvm-svn: 93752
* Add PCH support for CXXStaticCastExpr, CXXDynamicCastExpr, ↵Sam Weinig2010-01-161-0/+57
| | | | | | CXXReinterpretCastExpr, CXXConstCastExpr and CXXFunctionalCastExpr. llvm-svn: 93658
* Preserve type source information in explicit cast expressions.John McCall2010-01-151-1/+1
| | | | | | Patch by Enea Zaffanella. llvm-svn: 93522
* Move the allocation of designators in DesignatedInitExpr to theDouglas Gregor2010-01-061-1/+2
| | | | | | ASTContext. Fixes <rdar://problem/7495428>. llvm-svn: 92867
* Remember if the AsmStmt came from Microsoft-style inline assembly code.Mike Stump2010-01-041-0/+1
| | | | llvm-svn: 92526
* When value-initializing a class with no user-defined constructors butDouglas Gregor2009-12-161-0/+1
| | | | | | | with a non-trivial default constructor, zero-initialize the storage and then call the default constructor. Fixes PR5800. llvm-svn: 91548
* Switch the C++ new expression over to InitializationSequence, ratherDouglas Gregor2009-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | | than using its own partial implementation of initialization. Switched CheckInitializerTypes over to InitializedEntity/InitializationKind, to help move us closer to InitializationSequence. Added InitializedEntity::getName() to retrieve the name of the entity, for diagnostics that care about such things. Implemented support for default initialization in InitializationSequence. Clean up the determination of the "source expressions" for an initialization sequence in InitializationSequence::Perform. Taught CXXConstructExpr to store more location information. llvm-svn: 91492
* DeclRefExpr stores a ValueDecl internally.John McCall2009-12-081-1/+1
| | | | | | Template instantiation can re-use DeclRefExprs. llvm-svn: 90848
* DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated ↵John McCall2009-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | variables, but the results are imperfect. For posterity, I did: cat <<EOF > $cmdfile s/DeclaratorInfo/TypeSourceInfo/g s/DInfo/TInfo/g s/TypeTypeSourceInfo/TypeSourceInfo/g s/SourceTypeSourceInfo/TypeSourceInfo/g EOF find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \; find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \; find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \; llvm-svn: 90743
* Missed change from last commit.Eli Friedman2009-12-041-1/+1
| | | | llvm-svn: 90550
* Eliminate CXXConditionDeclExpr with extreme prejudice.Douglas Gregor2009-11-251-0/+1
| | | | | | | | | | | | | | | | | All statements that involve conditions can now hold on to a separate condition declaration (a VarDecl), and will use a DeclRefExpr referring to that VarDecl for the condition expression. ForStmts now have such a VarDecl (I'd missed those in previous commits). Also, since this change reworks the Action interface for if/while/switch/for, use FullExprArg for the full expressions in those expressions, to ensure that we're emitting Note that we are (still) not generating the right cleanups for condition variables in for statements. That will be a follow-on commit. llvm-svn: 89817
* Clean up the AST for while loops and fix several problems withDouglas Gregor2009-11-241-0/+1
| | | | | | | | | | | | | | | | | cleanups for while loops: 1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g., while (shared_ptr<WorkInt> p = getWorkItem()) { // ... } 2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g., while (blah) RAIIObject raii(blah+1); llvm-svn: 89800
* Explicitly store the condition variable within switch statements, andDouglas Gregor2009-11-241-0/+1
| | | | | | | make sure that this variable is destroyed when we exit the switch statement. llvm-svn: 89776
* Explicitly track the condition variable within an "if" statement,Douglas Gregor2009-11-231-0/+1
| | | | | | | | | rather than burying it in a CXXConditionDeclExpr (that occassionally hides behind implicit conversions). Similar changes for switch, while, and do-while will follow, then the removal of CXXConditionDeclExpr. This commit is the canary. llvm-svn: 89717
* Preserve type source information in sizeof/alignof expressions, and pass itJohn McCall2009-11-041-1/+1
| | | | | | through to indexing. llvm-svn: 86018
* Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor2009-10-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | qualified reference to a declaration that is not a non-static data member or non-static member function, e.g., namespace N { int i; } int j = N::i; Instead, extend DeclRefExpr to optionally store the qualifier. Most clients won't see or care about the difference (since QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the number of top-level expression types that clients need to cope with, brings the implementation of DeclRefExpr into line with MemberExpr, and simplifies and unifies our handling of declaration references. Extended DeclRefExpr to (optionally) store explicitly-specified template arguments. This occurs when naming a declaration via a template-id (which will be stored in a TemplateIdRefExpr) that, following template argument deduction and (possibly) overload resolution, is replaced with a DeclRefExpr that refers to a template specialization but maintains the template arguments as written. llvm-svn: 84962
* Add StringLiteral::getString -> StringRef.Daniel Dunbar2009-09-221-2/+2
| | | | llvm-svn: 82514
* Improve handling of initialization by constructor, by ensuring thatDouglas Gregor2009-09-091-0/+15
| | | | | | | | such initializations properly convert constructor arguments and fill in default arguments where necessary. This also makes the ownership model more clear. llvm-svn: 81394
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-32/+32
| | | | llvm-svn: 81346
* Source location information for ? and : in a ConditionalOperator, from Enea ↵Douglas Gregor2009-08-261-0/+2
| | | | | | Zaffanella llvm-svn: 80097
* Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian2009-08-201-5/+5
| | | | | | | | "ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
* Renamed ClassProp data member of ObjCImplctSetterGetterRefExprFariborz Jahanian2009-08-181-1/+1
| | | | | | | | to InterfaceDecl, as it is unrelated to any property and holds the InterfaceDecl needed for accessing class getter/setter methods using the dot-syntax. llvm-svn: 79371
* Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian2009-08-181-3/+5
| | | | | | | | Removed an unnecessary loop to get to setters incoming argument. Added DoxyGen comments. Still more work to do in this area (WIP). llvm-svn: 79365
* Transition the PCH support for ShuffleVectorExpr over to ASTContext allocationNate Begeman2009-08-121-1/+2
| | | | llvm-svn: 78783
* Introduce reference counting for statements and expressions, using itDouglas Gregor2009-08-081-0/+4
| | | | | | | to allow sharing of nodes. Simplifies some aspects of template instantiation, and fixes both PR3444 and <rdar://problem/6757457>. llvm-svn: 78450
* Add a CastKind enum to CastExpr. Right now it's not used for much but it ↵Anders Carlsson2009-07-311-0/+2
| | | | | | will be :) llvm-svn: 77650
* Allow front-end 'isa' access on object's of type 'id'.Steve Naroff2009-07-241-0/+12
| | | | | | | | Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning). Still need back-end CodeGen for ObjCIsaExpr. llvm-svn: 76979
* Read/write a CXXOperatorCallExpr from/to PCH files.Argyrios Kyrtzidis2009-07-141-1/+16
| | | | llvm-svn: 75598
* Fix PR 4489, a PCH crash during de-serialization.Douglas Gregor2009-07-011-1/+0
| | | | llvm-svn: 74664
* Added writing and reading of the ConstQualAdded flag ofFariborz Jahanian2009-06-201-0/+1
| | | | | | BlockDeclRefExpr to PCH. llvm-svn: 73800
* add the location of the ')' in a do/while statement to DoStmt.Chris Lattner2009-06-121-0/+1
| | | | | | This fixes a source range problem reported by Olaf Krzikalla. llvm-svn: 73266
* Fix lots of PCH crashes caused by the new assertions inDouglas Gregor2009-05-221-3/+4
| | | | | | | llvm::SmallVector, using data() instead of &[0]. The PCH testsuite now runs cleanly (again). llvm-svn: 72292
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-3/+3
| | | | llvm-svn: 72210
* Template instantiation for IndirectGotoStmt. Now my life is complete.Douglas Gregor2009-05-161-0/+1
| | | | llvm-svn: 71917
* Template instantiation for switch statementsDouglas Gregor2009-05-151-0/+3
| | | | llvm-svn: 71916
* Template instantiation for "for" loopsDouglas Gregor2009-05-151-0/+2
| | | | llvm-svn: 71901
* Template instantiation for do-while statements.Douglas Gregor2009-05-151-0/+1
| | | | llvm-svn: 71899
* Template instantiation for "if" statements. Also:Douglas Gregor2009-05-151-0/+1
| | | | | | | | - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. llvm-svn: 71875
* Make the PCH reader use the diagnostics system for its complaints.Douglas Gregor2009-04-281-8/+2
| | | | llvm-svn: 70330
* Teach PCH that ASTContext is optional. Move -parse-noop and -Eonly (so far)Chris Lattner2009-04-271-7/+7
| | | | | | | processing to after PCH is loaded. -Eonly and -parse-noop are close to working with PCH now but are not quite there yet. llvm-svn: 70257
OpenPOWER on IntegriCloud