summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for the weakref attribute. We still produce "alias weak" as ↵Rafael Espindola2010-02-231-0/+1
| | | | | | llvm-gcc does, but are more strict on what uses of weakref we accept. llvm-svn: 96992
* Implement PCH support for C++ namespaces.Douglas Gregor2010-02-211-0/+17
| | | | llvm-svn: 96738
* Patch removes IVars list from ObjCInterfaceDecl andFariborz Jahanian2010-02-191-1/+0
| | | | | | instead relies on their DeclContext for iteration, etc. llvm-svn: 96638
* Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes toTed Kremenek2010-02-181-0/+2
| | | | | | | match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
* Add IBAction attribute to keep the IBOutlet attribute company.Ted Kremenek2010-02-171-0/+4
| | | | llvm-svn: 96447
* 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
* Use the allocator associated with ASTContext to allocate the argsTed Kremenek2010-02-111-1/+1
| | | | | | | | array associated with NonNullAttr. This fixes yet another leak when ASTContext uses a BumpPtrAllocator. Fixes: <rdar://problem/7637150> llvm-svn: 95863
* Remove use of 'std::string' from Attr objects, using instead a byteTed Kremenek2010-02-111-2/+2
| | | | | | | | | array allocated using the allocator in ASTContext. This addresses these strings getting leaked when using a BumpPtrAllocator (in ASTContext). Fixes: <rdar://problem/7636765> llvm-svn: 95853
* Eliminate a bunch of unnecessary ASTContexts from members functions ofDouglas Gregor2010-02-111-3/+3
| | | | | | Decl subclasses. No functionality change. llvm-svn: 95841
* 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-1/+3
| | | | | | Fixes radar 7562952. llvm-svn: 94087
* Improve location information for Objective-C category declarations. WeDouglas Gregor2010-01-161-2/+4
| | | | | | | | | | | | | 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-4/+24
| | | | | | | | Objective-C classes, protocol definitions, forward protocol declarations, and categories. This information isn't actually used yet; that's coming next. llvm-svn: 93636
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-101-0/+3
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. llvm-svn: 93118
* 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-4/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Parse C++ member check attributes - base_check, hiding, and override.Alexis Hunt2009-11-251-0/+3
| | | | | | The attributes are currently ignored. llvm-svn: 89837
* Added rudimentary C++0x attribute support.Alexis Hunt2009-11-211-0/+1
| | | | | | | | | | | | | | The following attributes are currently supported in C++0x attribute lists (and in GNU ones as well): - align() - semantics believed to be conformant to n3000, except for redeclarations and what entities it may apply to - final - semantics believed to be conformant to CWG issue 817's proposed wording, except for redeclarations - noreturn - semantics believed to be conformant to n3000, except for redeclarations - carries_dependency - currently ignored (this is an optimization hint) llvm-svn: 89543
* Add SourceLocations to ObjCClassDecl for the class identifiers referenced by ↵Ted Kremenek2009-11-181-1/+6
| | | | | | @class. llvm-svn: 89170
* Add support for cdecl attribute. (As far as I know, it doesn't affect CodeGenEli Friedman2009-11-091-0/+2
| | | | | | | | unless we start implementing command-line switches which override the default calling convention, so the effect is mostly to silence unknown attribute warnings.) llvm-svn: 86571
* 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-4/+4
| | | | | | | | | 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-10/+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
* Factor out routines to encode/decode DeclaratorInfos and move them into theJohn McCall2009-10-161-77/+3
| | | | | | core PCH reader/writer implementation files. llvm-svn: 84278
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-0/+1
| | | | | | | | | | 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
* Introduce ObjCProtocolListLoc for keeping source location information for ↵Argyrios Kyrtzidis2009-09-291-0/+6
| | | | | | protocol references. llvm-svn: 83094
* Update PCH serialization of FunctionDecl flags.Daniel Dunbar2009-09-221-0/+3
| | | | llvm-svn: 82526
* PCH: When deserializing an explicit "external definition", don't pass it to ↵Daniel Dunbar2009-09-171-1/+2
| | | | | | | | HandleTopLevelDecl -- this is already being done inside the reader. This is something of a hack, since whether the reader actually did this depends on the "isConsumerInterestedIn" predicate. I think we need to rework how this works, but I need to discuss with Doug. llvm-svn: 82111
* Rework the way we determine whether an externally visible symbol isDouglas Gregor2009-09-131-1/+0
| | | | | | | | generated for an inline function definition, taking into account C99 and GNU inline/extern inline semantics. This solution is simpler, cleaner, and fixes PR4536. llvm-svn: 81670
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-25/+25
| | | | llvm-svn: 81346
* Regularize the case and sort.Mike Stump2009-08-261-2/+2
| | | | llvm-svn: 80163
* Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use ↵Argyrios Kyrtzidis2009-08-211-5/+2
| | | | | | DeclaratorInfo to get this information. llvm-svn: 79584
* Store/load type source info from/to PCH files.Argyrios Kyrtzidis2009-08-191-3/+73
| | | | llvm-svn: 79396
* Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema ↵Argyrios Kyrtzidis2009-08-191-6/+6
| | | | | | | | | | | | interfaces. DeclaratorDecl contains a DeclaratorInfo* to keep type source info. Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl. EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo. Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet. llvm-svn: 79392
* map previously ignored __attribute((malloc)) to noalias attribute of llvm ↵Ryan Flynn2009-08-091-0/+1
| | | | | | function's return llvm-svn: 78541
* Introduce a new PragmaPack attribute, and use it for #pragma pack. The ↵Anders Carlsson2009-08-081-1/+2
| | | | | | | | PackedAttr now only represents __attribute__((packed)). This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug. llvm-svn: 78483
* Make tag declarations redeclarable. This change has three purposes:Douglas Gregor2009-07-291-0/+2
| | | | | | | | | | | | | | | | 1) Allow the Index library (and any other interested client) to walk the set of declarations for a given tag (enum, union, class, whatever). At the moment, this information is not readily available. 2) Reduce our dependence on TagDecl::TypeForDecl being mapped down to a TagType (for which getDecl() will return the tag definition, if one exists). This property won't exist for class template partial specializations. 3) Make the canonical declaration of a TagDecl actually canonical, e.g., so that it does not change when the tag is defined. llvm-svn: 77523
* Make ObjCImplDecl inherit from ObjCContainerDecl.Argyrios Kyrtzidis2009-07-271-2/+1
| | | | | | ObjCContainerDecl now is the root class for objc decls that contain methods. llvm-svn: 77235
* Add the location of the tag keyword into TagDecl. From EneaDouglas Gregor2009-07-211-2/+3
| | | | | | Zaffanella, with tweaks from Abramo Bagnara. llvm-svn: 76576
* Reuse VarDecl::Init to store the default argument of a ParmVarDecl,Douglas Gregor2009-07-201-1/+0
| | | | | | | reducing the size of ParmVarDecl by one pointer. Also means that we'll properly (de-)serialize default arguments in C++ PCH files. llvm-svn: 76487
* Location should be passed to setLocEnd() not to setAtEndLoc() which belongs ↵Argyrios Kyrtzidis2009-07-181-1/+1
| | | | | | to ObjCContainerDecl. llvm-svn: 76268
* Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.Steve Naroff2009-07-141-1/+2
| | | | | Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary). llvm-svn: 75635
* Read/write TagDecl's RBraceLoc from/to PCH files.Argyrios Kyrtzidis2009-07-141-0/+1
| | | | llvm-svn: 75592
* Patch adds test to my previous patch for assigning toFariborz Jahanian2009-07-081-0/+1
| | | | | | | gc'able structs in the Next runtime and adds missing PCH info. llvm-svn: 75014
* Fix PR 4489, a crash in PCH loading that occurs when loading the nameDouglas Gregor2009-07-061-0/+3
| | | | | | | | | | of a top-level declaration loads another top-level declaration of the same name whose type depends on the first declaration having been completed. This commit breaks the circular dependency by delaying loads of top-level declarations triggered by loading a name until we are no longer recursively loading types or declarations. llvm-svn: 74847
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-1/+1
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
OpenPOWER on IntegriCloud