summaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTWriterDecl.cpp
Commit message (Collapse)AuthorAge
* [PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR ↵Argyrios Kyrtzidis2014-06-21
| | | | | | | | abbreviation record. Patch by Yiding Jia! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211438 91177308-0d34-0410-b5e6-96231b3b80d8
* Recompute the injected class name type for a class template specializationRichard Smith2014-05-23
| | | | | | | rather than saving and restoring it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209557 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Use 'nullptr'. Serialization edition.Craig Topper2014-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209392 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial codegen for '#pragma omp parallel'Alexey Bataev2014-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208077 91177308-0d34-0410-b5e6-96231b3b80d8
* When a module completes the definition of a class template specialization ↵Richard Smith2014-04-19
| | | | | | imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206680 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR18307: Properly (de)serialize inherited constructors and their using ↵Stephan Tolksdorf2014-03-27
| | | | | | | | declarations Reviewed in http://llvm-reviews.chandlerc.com/D3102 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204951 91177308-0d34-0410-b5e6-96231b3b80d8
* If a name is injected into an imported inline namespace without reopening thatRichard Smith2014-03-23
| | | | | | | | namespace, we need to update both the visible names of that namespace and of its enclosing namespace set. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204570 91177308-0d34-0410-b5e6-96231b3b80d8
* When we inject a declaration into a namespace, add the primary DeclContext toRichard Smith2014-03-23
| | | | | | | | the update set rather than the current DeclContext. Add test for the local extern case too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204568 91177308-0d34-0410-b5e6-96231b3b80d8
* If a template instantation introduces a name into a namespace, we need to writeRichard Smith2014-03-23
| | | | | | | | out a visible update record for that namespace even if it was never declared in this module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204554 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit an update record if we instantiate the definition of a function templateRichard Smith2014-03-22
| | | | | | | | | 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.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204547 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing code that doesn't compile in MSVC 2012 (but does in MSVC 2013) from ↵Aaron Ballman2014-03-21
| | | | | | r204417 and related commits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204471 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor and simplify DeclUpdates serialization.Richard Smith2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204397 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with ↵Aaron Ballman2014-03-14
| | | | | | iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203958 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators ↵Aaron Ballman2014-03-14
| | | | | | varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203937 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCCategoryDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-14
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203923 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-14
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203922 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCProtocolDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-14
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203919 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-13
| | | | | | protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203863 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_loc_begin() and ↵Aaron Ballman2014-03-13
| | | | | | protocol_loc_end() with iterator_range protocol_locs(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203847 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCInterfaceDecl iterators protocol_begin() and ↵Aaron Ballman2014-03-13
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203842 91177308-0d34-0410-b5e6-96231b3b80d8
* Renaming the chains() ranged iterator to chain() per suggestion by Richard ↵Aaron Ballman2014-03-07
| | | | | | Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203262 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing IndirectFieldDecl iterators chain_begin() and chain_end() ↵Aaron Ballman2014-03-07
| | | | | | with iterator_range chains(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203261 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() ↵Aaron Ballman2014-03-07
| | | | | | with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203255 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with ↵Aaron Ballman2014-03-07
| | | | | | iterator_range params(). Updating all of the usages of the iterators with range-based for loops. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203248 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix autolinking when modules are imported in pch filesBen Langmuir2014-01-31
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200505 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-25
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200082 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc] Refactor and improve functionality for the -Wunused-property-ivar ↵Argyrios Kyrtzidis2014-01-03
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198432 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC. Remove false positive warning for missing propertyFariborz Jahanian2014-01-02
| | | | | | | | backing ivar by not issuing this warning if ivar is referenced somewhere and accessor makes method calls. // rdar://15727325 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198367 91177308-0d34-0410-b5e6-96231b3b80d8
* [objc] Introduce ObjCInterfaceDecl::getDesignatedInitializers() to get theArgyrios Kyrtzidis2013-12-03
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196315 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectiveC: under -Wunused-property-ivar warn if property'sFariborz Jahanian2013-10-25
| | | | | | | | backing warning is not used in one of its accessor methods. // rdar://14989999 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193439 91177308-0d34-0410-b5e6-96231b3b80d8
* Make UsingShadowDecls redeclarable. This fixes some visibility problems withRichard Smith2013-10-23
| | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193219 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some functions for consistency.Rafael Espindola2013-10-17
| | | | | | Every other function in Redeclarable.h was using Decl instead of Declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
* Per latest drafting, switch to implementing init-captures as if by declaringRichard Smith2013-09-28
| | | | | | | and capturing a variable declaration, and complete the implementation of them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191605 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately""David Majnemer2013-09-17
| | | | | | | This reverts commit r190895 which reverted r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190904 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[-cxx-abi microsoft] Mangle local TagDecls appropriately"David Majnemer2013-09-17
| | | | | | | This reverts commit r190892. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190895 91177308-0d34-0410-b5e6-96231b3b80d8
* [-cxx-abi microsoft] Mangle local TagDecls appropriatelyDavid Majnemer2013-09-17
| | | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190892 91177308-0d34-0410-b5e6-96231b3b80d8
* C++ modules: if a class is defined in multiple modules (for instance, becauseRichard Smith2013-09-09
| | | | | | | | | | | | | 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, ...). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190315 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fix: disallow a variable template to be redeclared as a non-templated ↵Larisse Voufo2013-08-14
| | | | | | variable git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188350 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix implementation of C11 6.2.7/4 and C++11 [dcl.array]p3:Richard Smith2013-08-13
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188307 91177308-0d34-0410-b5e6-96231b3b80d8
* variable templates updated for PCH serialization... Still working on test ↵Larisse Voufo2013-08-13
| | | | | | cases... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188249 91177308-0d34-0410-b5e6-96231b3b80d8
* Added source locs for angled parentheses in class/var template partial specs.Enea Zaffanella2013-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188134 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9992: Serialize and deserialize the token sequence for a function template inRichard Smith2013-08-07
| | | | | | | -fdelayed-template-parsing mode. Patch by Will Wilson! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187916 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate CXXConstructorDecl::IsImplicitlyDefined.Jordan Rose2013-08-07
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187891 91177308-0d34-0410-b5e6-96231b3b80d8
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-06
| | | | | | 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... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve clarity/consistency of a few UsingDecl methods and related helpers.Enea Zaffanella2013-07-22
| | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186816 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialization support for TagDecl::IsCompleteDefinitionRequiredDavid Blaikie2013-07-14
| | | | | | Requested by Richard Smith in post-commit review of r186262 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186266 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix deserializing of class template partial specializations. Assign sequenceRichard Smith2013-06-25
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184811 91177308-0d34-0410-b5e6-96231b3b80d8
* Improved source code fidelity for gcc mode attribute.Enea Zaffanella2013-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184417 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linkage computation for derived types in inline functions.Rafael Espindola2013-05-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup handling of UniqueExternalLinkage.Rafael Espindola2013-05-13
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8