summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderStmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* read all decls (and attributes and stmts/exprs referenced by the decl)Chris Lattner2009-04-271-1/+0
| | | | | | from the DeclsCursor. llvm-svn: 70190
* change the interface to ReadStmt to force clients to pass a cursor in to ↵Chris Lattner2009-04-271-14/+14
| | | | | | read from. llvm-svn: 70188
* split stmt/expr deserialization out to PCHReaderStmt.cppChris Lattner2009-04-271-0/+1134
llvm-svn: 70186
OpenPOWER on IntegriCloud