summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
Commit message (Collapse)AuthorAgeFilesLines
* Don't warn for an unused label if it has 'unused' attribute. Fixes ↵Argyrios Kyrtzidis2010-09-282-0/+2
| | | | | | rdar://8483139. llvm-svn: 114954
* Fix a bug in loading macro records. Fixes yet another crash in libclang.Sebastian Redl2010-09-281-4/+5
| | | | llvm-svn: 114940
* Fix a use of an invalidated reference due to a hash map reallocating.Sebastian Redl2010-09-281-3/+8
| | | | llvm-svn: 114937
* My previous fix was incorrect for non-chained PCH reuse. Fix again.Sebastian Redl2010-09-271-1/+1
| | | | llvm-svn: 114922
* Kill FunctionDecl's IsCopyAssignment bit; it duplicated what couldDouglas Gregor2010-09-272-2/+0
| | | | | | | | already be determined by isCopyAssignmentOperator(), and was set too late in the process for all clients to see the appropriate value. Cleanup only; no functionality change. llvm-svn: 114916
* When chaining PCHs, only write PPRecords that don't come from PCH, and give ↵Sebastian Redl2010-09-272-4/+6
| | | | | | them the correct IDs. Fixes a crash in XCode. llvm-svn: 114913
* When setting the globally-visible declarations for a particularDouglas Gregor2010-09-241-5/+5
| | | | | | | | | | | | | identifier, we may have a Sema object but no translation unit scope (because parsing is finished). In this case, we still need to update the IdResolver, which might still be used when writing a PCH containing another PCH (without chaining). This bug manifested as a failure with precompiled preambles. Also, add a little environment-variable-sensitive logging for libclang. llvm-svn: 114774
* Change source manager serialization to be less tied to the PCH model.Sebastian Redl2010-09-222-14/+15
| | | | llvm-svn: 114575
* Only preload SLocEntries after the entire PCH chain was loaded.Sebastian Redl2010-09-221-15/+22
| | | | llvm-svn: 114518
* Reshuffle PerFileData's members to make more sense.Sebastian Redl2010-09-221-6/+7
| | | | llvm-svn: 114517
* Implement -Wunused-label.Argyrios Kyrtzidis2010-09-192-0/+2
| | | | llvm-svn: 114315
* Macro definitions in AST files have their own IDs.Sebastian Redl2010-09-152-5/+5
| | | | llvm-svn: 114014
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-6/+3
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* Eagerly evaluate type traits in Sema instead of lazily in AST. They actually ↵Sebastian Redl2010-09-132-0/+2
| | | | | | need Sema access to be correct, fixes coming up. llvm-svn: 113782
* When applying 'delete' on a pointer-to-array type match GCC and EDG behavior ↵Argyrios Kyrtzidis2010-09-132-0/+2
| | | | | | | | and treat it as 'delete[]'. Also offer a fix-it hint adding '[]'. llvm-svn: 113778
* Remove the trivial setters from CXXDeleteExpr.Argyrios Kyrtzidis2010-09-131-6/+5
| | | | llvm-svn: 113777
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-132-3/+13
| | | | | | | | The canonical FunctionTemplateDecl contains the specializations but we cannot use getCanonicalDecl on Template because it may still be initializing. Write and read it from PCH. Fixes http://llvm.org/PR8134 llvm-svn: 113744
* Avoid setters in ASTDeclReader::VisitClassTemplatePartialSpecializationDecl.Argyrios Kyrtzidis2010-09-131-11/+13
| | | | llvm-svn: 113743
* Avoid setters in ASTDeclReader::VisitClassTemplateSpecializationDecl.Argyrios Kyrtzidis2010-09-131-12/+21
| | | | llvm-svn: 113742
* Avoid setters in ASTDeclReader::VisitCXXRecordDecl.Argyrios Kyrtzidis2010-09-131-4/+5
| | | | llvm-svn: 113741
* Address Doug's comments.Sebastian Redl2010-09-101-3/+3
| | | | llvm-svn: 113650
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-3/+6
| | | | | | of whatever we were using before... llvm-svn: 113631
* Serialization support for CXXNoexceptExpr.Sebastian Redl2010-09-102-0/+21
| | | | llvm-svn: 113627
* Add proper type-source information to UnaryTypeTraitExpr, includingDouglas Gregor2010-09-092-2/+2
| | | | | | libclang visitation. llvm-svn: 113492
* Clean up CMake dependenciesDouglas Gregor2010-09-091-0/+2
| | | | llvm-svn: 113489
* Fix C++ PCH issue.Argyrios Kyrtzidis2010-09-092-16/+22
| | | | | | | | | Another beating by boost in this test case: http://llvm.org/PR8117 A function specialization wasn't properly initialized if it wasn't canonical. I wish there was a nice little test case but this was boost. llvm-svn: 113481
* When building SwitchStmts in Sema, record whether all the enum values of a ↵Ted Kremenek2010-09-092-0/+4
| | | | | | | | | | switch(enum) where covered by individual case statements. Flow-based analyses may wish to consult this information, and recording this in the AST allows us to obviate reconstructing this information later when we build the CFG. llvm-svn: 113447
* Re-enable CheckAccessDeclContext and make sure it doesn't trigger assertions.Argyrios Kyrtzidis2010-09-081-2/+1
| | | | llvm-svn: 113413
* Fix C++ PCH issues.Argyrios Kyrtzidis2010-09-082-18/+40
| | | | | | | | | | | PCH got a severe beating by the boost-using test case reported here: http://llvm.org/PR8099 Fix issues like: -When PCH reading, make sure Decl's getASTContext() doesn't get called since a Decl in the parent hierarchy may be initializing. -In ASTDeclReader::VisitFunctionDecl VisitRedeclarable should be called before using FunctionDecl's isCanonicalDecl() -In ASTDeclReader::VisitRedeclarableTemplateDecl CommonOrPrev must be initialized before anything else. llvm-svn: 113391
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-082-0/+32
| | | | llvm-svn: 113356
* Provide proper type-source location information forDouglas Gregor2010-09-082-9/+7
| | | | | | | | CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. llvm-svn: 113319
* Improve source-location information for CXXNewExpr, by hanging on toDouglas Gregor2010-09-072-0/+2
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Replace loops with SmallVector::append.Benjamin Kramer2010-09-062-6/+3
| | | | llvm-svn: 113185
* Fix a C++ PCH problem which was exposed by r113019. ↵Argyrios Kyrtzidis2010-09-061-0/+2
| | | | | | CXXBaseOrMemberInitializer's IsWritten and source order is not set. llvm-svn: 113161
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-022-21/+1
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* Avoid implicit string construction.Benjamin Kramer2010-09-021-1/+1
| | | | llvm-svn: 112820
* Implement libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-011-4/+4
| | | | | | | | | | | | | | | | three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. llvm-svn: 112730
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-012-8/+7
| | | | | | | | suppressing USRs). Also, fix up the source location information for using directives so that the declaration location refers to the namespace name. llvm-svn: 112693
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-012-1/+26
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* Improve location information in the representation of namespaceDouglas Gregor2010-09-012-5/+4
| | | | | | | | | | | | | | | | aliases. Previously, the location of the alias was at the "namespace" keyword. Now, it's on the identifier being declared (as is the custom for Clang), and we keep a separate source location for the "namespace" keyword. Also, added a getSourceRange() member function to NamespaceAliasDecl to correctly compute the source range. Finally, removed a bunch of setters from NamespaceAliasDecl and gave ASTReaderDecl friendship so that it could set the corresponding fields directly. llvm-svn: 112681
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-312-0/+2
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* Fix the memory leak of FloatingLiteral/IntegerLiteral.Argyrios Kyrtzidis2010-08-281-4/+4
| | | | | | | | | | | For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. I introduce the class 'APNumericStorage' which uses ASTContext's allocator for memory allocation and is used internally by FloatingLiteral/IntegerLiteral. Fixes rdar://7637185 llvm-svn: 112361
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-6/+6
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* More incremental progress towards not including Expr.h in Sema.h.John McCall2010-08-252-2/+2
| | | | llvm-svn: 112044
* Rename *PendingImplicitInstantiations to *PendingInstantiations. NoChandler Carruth2010-08-252-26/+23
| | | | | | functionality changed. llvm-svn: 112040
* Move more stuff out of Sema.h.John McCall2010-08-252-0/+2
| | | | llvm-svn: 112026
* AST writer support for having specializations of templates from earlier in ↵Sebastian Redl2010-08-242-3/+30
| | | | | | the chain. This ought to finish C++ chained PCH support. llvm-svn: 111986
* AST reader support for having specializations of templates from earlier in ↵Sebastian Redl2010-08-242-0/+21
| | | | | | the chain. llvm-svn: 111985
* More header elimination. The goal of all this is to allow Parser toJohn McCall2010-08-241-0/+1
| | | | | | | #include Sema.h while keeping all the AST declarations opaque. That may not be reasonably attainable, though. llvm-svn: 111907
* Remove a header dependency from Sema.h at the cost of some type safety.John McCall2010-08-242-0/+2
| | | | | | If someone wants to fix this some other way.... llvm-svn: 111905
OpenPOWER on IntegriCloud