summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When we inject a declaration into a namespace, add the primary DeclContext toRichard Smith2014-03-231-1/+2
| | | | | | | the update set rather than the current DeclContext. Add test for the local extern case too. llvm-svn: 204568
* If a template instantation introduces a name into a namespace, we need to writeRichard Smith2014-03-231-0/+12
| | | | | | | out a visible update record for that namespace even if it was never declared in this module. llvm-svn: 204554
* Emit an update record if we instantiate the definition of a function templateRichard Smith2014-03-221-0/+16
| | | | | | | | specialization from a module. (This can also happen for function template specializations in PCHs if they're instantiated eagerly, because they're constexpr or have a deduced return type.) llvm-svn: 204547
* Fixing code that doesn't compile in MSVC 2012 (but does in MSVC 2013) from ↵Aaron Ballman2014-03-211-1/+1
| | | | | | r204417 and related commits. llvm-svn: 204471
* Refactor and simplify DeclUpdates serialization.Richard Smith2014-03-201-3/+2
| | | | llvm-svn: 204397
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-141-3/+1
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203958
* [C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators ↵Aaron Ballman2014-03-141-4/+2
| | | | | | varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203937
* [C++11] Replacing ObjCCategoryDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203923
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-141-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203922
* [C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-141-4/+2
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203919
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-3/+2
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203863
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-131-4/+2
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203847
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-131-4/+2
| | | | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. Drive-by fixing some incorrect types where a for loop would be improperly using ObjCInterfaceDecl::protocol_iterator. No functional changes in these cases. llvm-svn: 203842
* Renaming the chains() ranged iterator to chain() per suggestion by Richard ↵Aaron Ballman2014-03-071-1/+1
| | | | | | Smith. llvm-svn: 203262
* [C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() ↵Aaron Ballman2014-03-071-4/+2
| | | | | | with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203261
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-071-3/+2
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203255
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-071-3/+2
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203248
* Fix autolinking when modules are imported in pch filesBen Langmuir2014-01-311-7/+7
| | | | | | | | | | | | Add the ImportDecl to the set of interesting delcarations that are deserialized eagerly when an AST file is loaded (rather than lazily like most decls). This is required to get auto linking to work when there is no explicit import in the main file. Also resolve a FIXME to rename 'ExternalDefinitions', since that is only one of the things that need eager deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding AST bitcode is also renamed. llvm-svn: 200505
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-2/+2
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* [objc] Refactor and improve functionality for the -Wunused-property-ivar ↵Argyrios Kyrtzidis2014-01-031-2/+0
| | | | | | | | | | | | | | warning. - Remove the additions to ObjCMethodDecl & ObjCIVarDecl that were getting de/serialized and consolidate all functionality for the checking for this warning in Sema::DiagnoseUnusedBackingIvarInAccessor - Don't check immediately after the method body is finished, check when the @implementation is finished. This is so we can see if the ivar was referenced by any other method, even if the method was defined after the accessor. - Don't silence the warning if any method is called from the accessor silence it if the accessor delegates to another method via self. rdar://15727325 llvm-svn: 198432
* ObjectiveC. Remove false positive warning for missing propertyFariborz Jahanian2014-01-021-0/+1
| | | | | | | backing ivar by not issuing this warning if ivar is referenced somewhere and accessor makes method calls. // rdar://15727325 llvm-svn: 198367
* [objc] Introduce ObjCInterfaceDecl::getDesignatedInitializers() to get theArgyrios Kyrtzidis2013-12-031-0/+1
| | | | | | | | | | designated initializers of an interface. If the interface declaration does not have methods marked as designated initializers then the interface inherits the designated initializers of its super class. llvm-svn: 196315
* ObjectiveC: under -Wunused-property-ivar warn if property'sFariborz Jahanian2013-10-251-0/+3
| | | | | | | backing warning is not used in one of its accessor methods. // rdar://14989999 llvm-svn: 193439
* Make UsingShadowDecls redeclarable. This fixes some visibility problems withRichard Smith2013-10-231-0/+1
| | | | | | | | | | modules. With this fixed, I no longer see any test regressions in the libc++ test suite when enabling a single-module module.map for libc++ (other than issues with my system headers). llvm-svn: 193219
* Rename some functions for consistency.Rafael Espindola2013-10-171-9/+9
| | | | | | Every other function in Redeclarable.h was using Decl instead of Declaration. llvm-svn: 192900
* Per latest drafting, switch to implementing init-captures as if by declaringRichard Smith2013-09-281-0/+4
| | | | | | and capturing a variable declaration, and complete the implementation of them. llvm-svn: 191605
* Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""David Majnemer2013-09-171-0/+2
| | | | | | This reverts commit r190895 which reverted r190892. llvm-svn: 190904
* Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"David Majnemer2013-09-171-3/+1
| | | | | | This reverts commit r190892. llvm-svn: 190895
* [-cxx-abi microsoft] Mangle local TagDecls appropriatelyDavid Majnemer2013-09-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: When selecting a mangling for an anonymous tag type: - We should first try it's typedef'd name. - If that doesn't work, we should mangle in the name of the declarator that specified it as a declaration specifier. - If that doesn't work, fall back to a static mangling of <unnamed-type>. This should make our anonymous type mangling compatible. This partially fixes PR16994; we would need to have an implementation of scope numbering to get it right (a separate issue). Reviewers: rnk, rsmith, rjmccall, cdavis5x CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1540 llvm-svn: 190892
* C++ modules: if a class is defined in multiple modules (for instance, becauseRichard Smith2013-09-091-7/+7
| | | | | | | | | | | | it is an implicit instantiation of a class template specialization), pick the first-loaded definition to be the canonical definition, and merge all other definitions into it. This is still rather incomplete -- we need to extend every form of declaration that can appear within a CXXRecordDecl to be redeclarable if it came from an AST file (this includes fields, enumerators, ...). llvm-svn: 190315
* Bug fix: disallow a variable template to be redeclared as a non-templated ↵Larisse Voufo2013-08-141-6/+13
| | | | | | variable llvm-svn: 188350
* Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:Richard Smith2013-08-131-0/+4
| | | | | | | | | | | | | When a local extern declaration redeclares some other entity, the type of that entity is merged with the prior type if the prior declaration is visible (in C) or is declared in the same scope (in C++). - Make LookupRedeclarationWithLinkage actually work in C++, use it in the right set of cases, and make it track whether it found a shadowed declaration. - Track whether we found a declaration in the same scope (for C++) including across serialization and template instantiation. llvm-svn: 188307
* variable templates updated for PCH serialization... Still working on test ↵Larisse Voufo2013-08-131-0/+1
| | | | | | cases... llvm-svn: 188249
* Added source locs for angled parentheses in class/var template partial specs.Enea Zaffanella2013-08-101-10/+2
| | | | llvm-svn: 188134
* PR9992: Serialize and deserialize the token sequence for a function template inRichard Smith2013-08-071-0/+1
| | | | | | -fdelayed-template-parsing mode. Patch by Will Wilson! llvm-svn: 187916
* Eliminate CXXConstructorDecl::IsImplicitlyDefined.Jordan Rose2013-08-071-2/+0
| | | | | | | | | | | | This field is just IsDefaulted && !IsDeleted; in all places it's used, a simple check for isDefaulted() is superior anyway, and we were forgetting to set it in a few cases. Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons. No intended functionality change. llvm-svn: 187891
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-061-0/+85
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* Improve clarity/consistency of a few UsingDecl methods and related helpers.Enea Zaffanella2013-07-221-2/+2
| | | | | | | | | | | | No functionality change. In Sema helper functions: * renamed isTypeName as HasTypenameKeyword In UsingDecl: * renamed get/setUsingLocation to get/setUsingLoc * renamed is/setTypeName as has/setTypename llvm-svn: 186816
* Serialization support for TagDecl::IsCompleteDefinitionRequiredDavid Blaikie2013-07-141-0/+3
| | | | | | Requested by Richard Smith in post-commit review of r186262 llvm-svn: 186266
* Fix deserializing of class template partial specializations. Assign sequenceRichard Smith2013-06-251-2/+0
| | | | | | | | | | numbers as we deserialize class template partial specializations. We can't assume that the old sequence numbers will work. The sequence numbers are still deterministic, but are now a lot less predictable for class template partial specializations in modules/PCH. llvm-svn: 184811
* Improved source code fidelity for gcc mode attribute.Enea Zaffanella2013-06-201-1/+4
| | | | llvm-svn: 184417
* Fix linkage computation for derived types in inline functions.Rafael Espindola2013-05-251-1/+1
| | | | | | | | | | | | | | | | | John noticed that the fix for pr15930 (r181981) didn't handle indirect uses of local types. For example, a pointer to local struct, or a function that returns it. One way to implement this would be to recursively look for local types. This would look a lot like the linkage computation itself for types. To avoid code duplication and utilize the existing linkage cache, this patch just makes the computation of "type with no linkage but externally visible because it is from an inline function" part of the linkage computation itself. llvm-svn: 182711
* Cleanup handling of UniqueExternalLinkage.Rafael Espindola2013-05-131-2/+2
| | | | | | | | | | | | | This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. llvm-svn: 181677
* In VarDecl nodes, store the thread storage class specifier as written.Enea Zaffanella2013-05-041-4/+4
| | | | llvm-svn: 181113
* Rename ObjCImplementationDecl::getSuperLoc() -> getSuperClassLoc() for ↵Argyrios Kyrtzidis2013-05-031-1/+1
| | | | | | consistency with ObjCInterfaceDecl::getSuperClassLoc() llvm-svn: 181064
* Serialization for captured statementsBen Langmuir2013-05-031-2/+7
| | | | | | | | | | | Add serialization for captured statements and captured decls. Also add a const_capture_iterator to CapturedStmt. Test contributed by Wei Pan Differential Revision: http://llvm-reviews.chandlerc.com/D727 llvm-svn: 181048
* Keep track of an @implementation's super class name location, if one was ↵Argyrios Kyrtzidis2013-05-031-0/+1
| | | | | | provided. llvm-svn: 181039
* Sema for Captured StatementsTareq A. Siraj2013-04-161-0/+5
| | | | | | | | | | | | | Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 llvm-svn: 179618
* Basic support for Microsoft property declarations andJohn McCall2013-04-161-0/+8
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* Annotate flavor of TLS variable (statically or dynamically initialized) onto ↵Richard Smith2013-04-131-4/+4
| | | | | | the AST. llvm-svn: 179447
OpenPOWER on IntegriCloud