summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriterDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix various bugs in recent commits for C++ PCH.Argyrios Kyrtzidis2010-06-281-0/+2
| | | | llvm-svn: 106995
* Support NonTypeTemplateParmDecl for PCH.Argyrios Kyrtzidis2010-06-251-1/+11
| | | | llvm-svn: 106860
* Add forgotten breaks in case statements.Argyrios Kyrtzidis2010-06-251-0/+2
| | | | llvm-svn: 106857
* Support C++ class template specializations and partial specializations for PCH.Argyrios Kyrtzidis2010-06-231-18/+44
| | | | llvm-svn: 106625
* Patch to provide separate ASTs for multiple ObjC class extension Fariborz Jahanian2010-06-221-0/+1
| | | | | | declarations (implements radar 7928731). llvm-svn: 106597
* Support emitting/reading function templates to/from PCH.Argyrios Kyrtzidis2010-06-221-4/+73
| | | | llvm-svn: 106534
* Support PCH emitting/reading of using declarations.Argyrios Kyrtzidis2010-06-201-4/+4
| | | | llvm-svn: 106404
* Include a hack to allow loading of templated CXXRecordDecls and test ↵Argyrios Kyrtzidis2010-06-191-1/+11
| | | | | | template reading from PCH. llvm-svn: 106393
* Initial support for writing templates to PCH.Argyrios Kyrtzidis2010-06-191-3/+65
| | | | llvm-svn: 106391
* Given Decl::isUsed() a flag indicating when to consider the "used"Douglas Gregor2010-06-171-2/+2
| | | | | | | | | attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. llvm-svn: 106252
* Added AccessSpecDecl node.Abramo Bagnara2010-06-051-0/+7
| | | | llvm-svn: 105525
* Remember type source information for Objective C property declarations.John McCall2010-06-041-1/+1
| | | | llvm-svn: 105484
* Restructure how we interpret block-literal declarators. Correctly handleJohn McCall2010-06-041-0/+1
| | | | | | | the case where we pick up block arguments from a typedef. Save the block signature as it was written, and preserve same through PCH. llvm-svn: 105466
* Hack in some really terrible C++ record PCH support that I need right now.John McCall2010-06-031-0/+17
| | | | | | | | This is required in order to test: The ASTImporter should set base classes after formally entering the definition. llvm-svn: 105401
* Convert DeclNodes to use TableGen.Alexis Hunt2010-05-301-1/+1
| | | | | | | | The macros required for DeclNodes use have changed to match the use of StmtNodes. The FooFirst enumerator constants have been named firstFoo to match usage elsewhere. llvm-svn: 105165
* Roll back r104941.John McCall2010-05-281-1/+0
| | | | llvm-svn: 104990
* Add a new attribute on records, __attribute__((adl_invisible)), and defineJohn McCall2010-05-281-0/+1
| | | | | | | | | | | | the x86-64 __va_list_tag with this attribute. The attribute causes the affected type to behave like a fundamental type when considered by ADL. (x86-64 is the only target we currently provide with a struct-based __builtin_va_list) Fixes PR6762. llvm-svn: 104941
* Implement semantic analysis and an AST representation for the namedDouglas Gregor2010-05-151-0/+2
| | | | | | | | | | | | return value optimization. Sema marks return statements with their NRVO candidates (which may or may not end up using the NRVO), then, at the end of a function body, computes and marks those variables that can be allocated into the return slot. I've checked this locally with some debugging statements (not committed), but there won't be any tests until CodeGen comes along. llvm-svn: 103865
* pch'ify default argument definitions and uses.Chris Lattner2010-05-091-3/+3
| | | | llvm-svn: 103376
* add PCH support for a bunch of C++ Decls, patch byChris Lattner2010-05-071-15/+191
| | | | | | Andrew Sutton! llvm-svn: 103301
* Remember the number of positive and negative bits used by the enumerators ofJohn McCall2010-05-061-0/+2
| | | | | | | an enum in the enum decl itself. Use some spare bits from TagDecl for this purpose. llvm-svn: 103173
* This patch deals with Sema Part of Setter/Getter synthesisFariborz Jahanian2010-05-051-0/+1
| | | | | | | of properties which are of C++ objects. Code Gen to follow (Radar 7468090). llvm-svn: 103123
* Diagnose unused exception parameters under a different warning groupDouglas Gregor2010-05-031-0/+3
| | | | | | | | (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>. llvm-svn: 102931
* More of Sema to implement initialization ofFariborz Jahanian2010-04-281-0/+1
| | | | | | ivar of c++ object types. llvm-svn: 102500
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-191-0/+3
| | | | | | | | function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826
* Implement method type encoding in the presenseFariborz Jahanian2010-04-081-0/+1
| | | | | | of c-style arguments. Completes radar 7445205. llvm-svn: 100813
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-1/+1
| | | | llvm-svn: 100708
* Remember declaration scope qualifiers in the AST. Imposes no memory overheadJohn McCall2010-03-151-1/+3
| | | | | | | | | | | on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. llvm-svn: 98540
* Remember whether a ParmVarDecl was spelled with a default argument orJohn McCall2010-03-121-1/+4
| | | | | | | | whether it inherited one from a previous declaration. Patch by Enea Zaffanella! llvm-svn: 98362
* Keep track of type source information in the return type of anDouglas Gregor2010-03-081-0/+1
| | | | | | | | | | Objective-C method declaration, e.g., for - (Foo *)myMethod; we now have TypeSourceInfo for the Foo*. llvm-svn: 97942
* Implement PCH support for C++ namespaces.Douglas Gregor2010-02-211-0/+11
| | | | llvm-svn: 96738
* Improve representation of tag declarations first declared or definedDouglas Gregor2010-02-121-1/+1
| | | | | | within the declarator of another declaration, from Enea Zaffanella! llvm-svn: 95991
* Keep track of whether a tag was defined in a declarator vs. beingDouglas Gregor2010-02-081-0/+1
| | | | | | defined by itself, from Enea Zaffanella! llvm-svn: 95586
* Patch to implement rewriting of properties.Fariborz Jahanian2010-01-211-0/+1
| | | | | | Fixes radar 7562952. llvm-svn: 94087
* Improve location information for Objective-C category declarations. WeDouglas Gregor2010-01-161-1/+2
| | | | | | | | | | | | | previously only had a single location (the @ in @interface); now we know where the @ is (for the start of the declaration), where the class name is (that's the normal "location" now for diagnostics), and where the category name is. Also, eliminated the redundant "end" location, since ObjCContainerDecl already has better @end information. The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught CIndex how to use the new locations. llvm-svn: 93639
* Keep track of the source locations for each protocol reference inDouglas Gregor2010-01-161-2/+18
| | | | | | | | Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. llvm-svn: 93636
* Change ObjCContainerDecl to contain the entire range for the '@end'Ted Kremenek2010-01-071-1/+3
| | | | | | | | | | | piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). llvm-svn: 92891
* First pass at implementing C++ enum semantics: calculate (and store) anJohn McCall2009-12-091-0/+1
| | | | | | | | | | | | "integer promotion" type associated with an enum decl, and use this type to determine which type to promote to. This type obeys C++ [conv.prom]p2 and is therefore generally signed unless the range of the enumerators forces it to be unsigned. Kills off a lot of false positives from -Wsign-compare in C++, addressing rdar://7455616 llvm-svn: 90965
* DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated ↵John McCall2009-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Use llvm_report_error instead of fprintf + assert + exit.Daniel Dunbar2009-12-031-8/+5
| | | | llvm-svn: 90438
* Add SourceLocations to ObjCClassDecl for the class identifiers referenced by ↵Ted Kremenek2009-11-181-1/+3
| | | | | | @class. llvm-svn: 89170
* Rename FunctionDecl::isInline/setInline toDouglas Gregor2009-10-271-1/+1
| | | | | | FunctionDecl::isInlineSpecified/setInlineSpecified. llvm-svn: 85305
* Preserve type source information in TypedefDecls. Preserve it acrossJohn McCall2009-10-241-1/+1
| | | | | | | | | template instantiation. Preserve it through PCH. Show it off to the indexer. I'm healthily ignoring the vector type cases because we don't have a sensible TypeLoc implementation for them anyway. llvm-svn: 84994
* Remove OriginalTypeParmDecl; the original type is the one specifiedJohn McCall2009-10-231-8/+0
| | | | | | | | | | | | | in the DeclaratorInfo, if one is present. Preserve source information through template instantiation. This is made more complicated by the possibility that ParmVarDecls don't have DIs, which is possibly worth fixing in the future. Also preserve source information for function parameters in ObjC method declarations. llvm-svn: 84971
* Merge the "types" and "declarations" blocks in the precompiled headerDouglas Gregor2009-10-171-66/+50
| | | | | | | | | | | | | | | format, so that we don't end up with multiple declaration and types blocks. Also, fix a few obscure bugs with PCH loading and generation: - If the DeclIDs DenseMap reallocates while we are writing a declaration (due to recursively writing other declarations), we could end up writing a bad ID to ExternalDefinitions. - When loading an ArrayLoc (part of DeclaratorInfo), we need to set the size expression to NULL if no size expression was provided. PCH -> AST rewriting is still partly broken, unfortunately. llvm-svn: 84293
* Factor out routines to encode/decode DeclaratorInfos and move them into theJohn McCall2009-10-161-76/+1
| | | | | | core PCH reader/writer implementation files. llvm-svn: 84278
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-0/+3
| | | | | | | | | | header or not via a new "PCHLevel" field in Decl. We currently use this information to help CIndex filter out declarations that came from a precompiled header (rather than from an AST file). Further down the road, it can be used to help implement multi-level precompiled headers. llvm-svn: 84267
* Better living through metaprogramming. Create a base class which abstractsJohn McCall2009-10-151-1/+4
| | | | | | | | | | | most of the unsafe boilerplate out of TypeLoc. Create a QualifiedLoc class to represent the idea that we *might* start representing source locations of qualifiers. Dealing with qualifiers explicitly like this also lets us efficiently ignore them in all the concrete cases. This should make it obvious and easy to add new TypeLoc subclasses. llvm-svn: 84168
* Pull TypeLocVisitor into its own header file.Argyrios Kyrtzidis2009-09-291-1/+1
| | | | llvm-svn: 83112
* Introduce ObjCInterfaceLoc which provides type source information for ObjC ↵Argyrios Kyrtzidis2009-09-291-0/+3
| | | | | | interfaces. llvm-svn: 83097
OpenPOWER on IntegriCloud