summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTImporter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASTImporter] Improved import of friend templates.Balazs Keri2018-08-131-10/+36
| | | | | | | | | | | | | | | | | | | Summary: When importing a friend class template declaration, this declaration should not be merged with any other existing declaration for the same type. Otherwise the getFriendDecl of the FriendDecl can point to an other already referenced declaration, this case causes problems. Additionally the previous decl of class templates is set at import. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50516 llvm-svn: 339560
* Port getLocEnd -> getEndLocStephen Kelly2018-08-091-19/+15
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 llvm-svn: 339386
* Port getLocStart -> getBeginLocStephen Kelly2018-08-091-37/+33
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 llvm-svn: 339385
* Port getStartLoc -> getBeginLocStephen Kelly2018-08-091-1/+1
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50349 llvm-svn: 339384
* Add support for importing imaginary literalsGabor Marton2018-08-091-0/+13
| | | | | | | | | | Reviewers: a_sidorin, r.stahl, xazax.hun Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D50428 llvm-svn: 339334
* [ASTImporter] Load external Decls when getting field index.Balazs Keri2018-08-081-19/+28
| | | | | | | | | | | | | | | | | Summary: At equality check of fields without name the index of fields is compared. At determining the index of a field all fields of the parent context should be loaded from external source to find the field at all. Reviewers: a.sidorin, a_sidorin, r.stahl Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D49796 llvm-svn: 339226
* [ASTmporter] SourceRange-free function parameter checking for declarationsGabor Marton2018-08-061-9/+15
| | | | | | | | | | | | | | | | Summary: The previous code which avoided infinite recursion (because of reparsing declarations in function parameter lists) contained SourceRange dependent code which had some problems when parameter types were coming from macros. The new solution is not using macros and therefore much safer. A couple of importer problems are fixed in redis and tmux by this fix. Various unittests are included. Reviewers: a.sidorin, r.stahl, a_sidorin Reviewed By: a_sidorin Subscribers: cfe-commits, dkrupp, balazske, martong Differential Revision: https://reviews.llvm.org/D49792 Patch by Zoltan Gera! llvm-svn: 339018
* Remove trailing spaceFangrui Song2018-07-301-239/+239
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
* [ASTImporter] Add support for import of CXXInheritedCtorInitExpr.Balazs Keri2018-07-251-0/+17
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D49293 llvm-svn: 337898
* [ASTImporter] Fix poisonous structural equivalence cacheGabor Marton2018-07-171-15/+20
| | | | | | | | | | | | | | | | | | | | | Summary: Implementation functions call into the member functions of ASTStructuralEquivalence, thus they can falsely alter the DeclsToCheck state (they add decls). This results that some leaf declarations can be stated as inequivalent as a side effect of one inequivalent element in the DeclsToCheck list. And since we store the non-equivalencies, any (otherwise independent) decls will be rendered as non-equivalent. Solution: I tried to clearly separate the implementation functions (the static ones) and the public interface. From now on, the implementation functions do not call any public member functions, only other implementation functions. Reviewers: a.sidorin, a_sidorin, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D49300 llvm-svn: 337275
* [ASTImporter] Import described template (if any) of function.Balazs Keri2018-07-171-0/+14
| | | | | | | | | | | | | | | | | Summary: When a function is imported, check if it has a described template. The name lookup is corrected to find the templated entity in this case. The described template of the function is imported too. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D49235 llvm-svn: 337260
* [ASTImporter] Import implicit methods of existing class.Balazs Keri2018-07-161-2/+24
| | | | | | | | | | | | | | | | | | | | Summary: When an already existing class is encountered during import, check if it has implicit methods that are missing in the existing one, and import these. The to-be-imported code may use the same class in different way than the existing (before the import) code. This may result in that there are implicit methods that are not generated for the existing code. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D49245 llvm-svn: 337162
* [ASTImporter] Fix infinite recursion on function import with struct ↵Gabor Marton2018-07-121-1/+19
| | | | | | | | | | | | | | | | | | | definition in parameters Summary: Importing a function having a struct definition in the parameter list causes a crash in the importer via infinite recursion. This patch avoids the crash and reports such functions as not supported. Unit tests make sure that normal struct definitions inside function bodies work normally on the other hand and LLDB-like type imports also do. Reviewers: a.sidorin, martong Differential Revision: https://reviews.llvm.org/D47946 Patch by Zoltan Gera! llvm-svn: 336898
* [ASTImporter] Refactor Decl creationGabor Marton2018-07-121-416/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Generalize the creation of Decl nodes during Import. With this patch we do the same things after and before a new AST node is created (::Create) The import logic should be really simple, we create the node, then we mark that as imported, then we recursively import the parts for that node and then set them on that node. However, the AST is actually a graph, so we have to handle circles. If we mark something as imported (`MapImported()`) then we return with the corresponding `To` decl whenever we want to import that node again, this way circles are handled. In order to make this algorithm work we must ensure things, which are handled in the generic CreateDecl<> template: * There are no `Import()` calls in between any node creation (::Create) and the `MapImported()` call. * Before actually creating an AST node (::Create), we must check if the Node had been imported already, if yes then return with that one. One very important case for this is connected to templates: we may start an import both from the templated decl of a template and from the template itself. Now, the virtual `Imported` function is called in `ASTImporter::Impor(Decl *)`, but only once, when the `Decl` is imported. One point of this refactor is to separate responsibilities. The original `Imported()` had 3 responsibilities: - notify subclasses when an import happened - register the decl into `ImportedDecls` - initialise the Decl (set attributes, etc) Now all of these are in separate functions: - `Imported` - `MapImported` - `InitializeImportedDecl` I tried to check all the clients, I executed tests for `ExternalASTMerger.cpp` and some unittests for lldb. Reviewers: a.sidorin, balazske, xazax.hun, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47632 llvm-svn: 336896
* [AST] Structural equivalence of methodsBalazs Keri2018-07-111-7/+17
| | | | | | | | | | | | | | | | | Summary: Added structural equivalence check for C++ methods. Improved structural equivalence tests. Added related ASTImporter tests. Reviewers: a.sidorin, szepet, xazax.hun, martong, a_sidorin Reviewed By: martong, a_sidorin Subscribers: a_sidorin, rnkovacs, cfe-commits Differential Revision: https://reviews.llvm.org/D48628 llvm-svn: 336776
* [ASTImporter] import FunctionDecl end locationsRafael Stahl2018-07-091-2/+3
| | | | | | | | | | | | | | Summary: On constructors that do not take the end source location, it was not imported. Fixes test from D47698 / rC336269. Reviewers: martong, a.sidorin, balazske, xazax.hun, a_sidorin Reviewed By: martong, a_sidorin Subscribers: a_sidorin, rnkovacs, cfe-commits Differential Revision: https://reviews.llvm.org/D48941 llvm-svn: 336523
* [ASTImporter] Fix import of objects with anonymous typesGabor Marton2018-07-051-11/+2
| | | | | | | | | | | | | | | | Summary: Currently, anonymous types are merged into the same redecl chain even if they are structurally inequivalent. This results that global objects are not imported, if there are at least two global objects with different anonymous types. This patch provides a fix. Reviewers: a.sidorin, balazske, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D48773 llvm-svn: 336332
* [ASTImporter] import macro source locationsRafael Stahl2018-07-041-37/+46
| | | | | | | | | | | | | | Summary: Implement full import of macro expansion info with spelling and expansion locations. Reviewers: a.sidorin, klimek, martong, balazske, xazax.hun Reviewed By: martong Subscribers: thakis, xazax.hun, balazske, rnkovacs, cfe-commits Differential Revision: https://reviews.llvm.org/D47698 llvm-svn: 336269
* [ASTImporter] Added import of CXXStdInitializerListExprGabor Marton2018-06-291-0/+14
| | | | | | | | | | | | | | Reviewers: a.sidorin Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D48631 Patch by Balazs Keri! llvm-svn: 335968
* Re-apply: [ASTImporter] Import the whole redecl chain of functionsGabor Marton2018-06-271-37/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch when any `FunctionDecl` of a redeclaration chain is imported then we bring in the whole declaration chain. This involves functions and function template specializations. Also friend functions are affected. The chain is imported as it is in the "from" tu, the order of the redeclarations are kept. I also changed the lookup logic in order to find friends, but first making them visible in their declaration context. We may have long redeclaration chains if all TU contains the same prototype, but our measurements shows no degradation in time of CTU analysis (Tmux, Xerces, Bitcoin, Protobuf). Also, as further work we could squash redundant prototypes, but first ensure that functionality is working properly; then should we optimize. This may seem like a huge patch, sorry about that. But, most of the changes are new tests, changes in the production code is not that much. I also tried to create a smaller patch which does not affect specializations, but that patch failed to pass some of the `clang-import-test`s because there we import function specializations. Also very importantly, we can't just change the import of `FunctionDecl`s without changing the import of function template specializations because they are handled as `FunctionDecl`s. Reviewers: a.sidorin, r.stahl, xazax.hun, balazske, a_sidorin Reviewed By: a_sidorin Subscribers: labath, aprantl, a_sidorin, rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47532 Re-apply commit rC335480 llvm-svn: 335731
* [ASTImporter] Use InjectedClassNameType at import of templated record.Gabor Marton2018-06-261-0/+23
| | | | | | | | | | | | | | | | | | Summary: At import of a record describing a template set its type to InjectedClassNameType (instead of RecordType). Reviewers: a.sidorin, martong, r.stahl Reviewed By: a.sidorin, martong, r.stahl Subscribers: a_sidorin, rnkovacs, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D47450 Patch by Balazs Keri! llvm-svn: 335600
* Revert "[ASTImporter] Import the whole redecl chain of functions"Gabor Marton2018-06-251-128/+37
| | | | | | This reverts commit r335480. llvm-svn: 335491
* [ASTImporter] Import the whole redecl chain of functionsGabor Marton2018-06-251-37/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch when any `FunctionDecl` of a redeclaration chain is imported then we bring in the whole declaration chain. This involves functions and function template specializations. Also friend functions are affected. The chain is imported as it is in the "from" tu, the order of the redeclarations are kept. I also changed the lookup logic in order to find friends, but first making them visible in their declaration context. We may have long redeclaration chains if all TU contains the same prototype, but our measurements shows no degradation in time of CTU analysis (Tmux, Xerces, Bitcoin, Protobuf). Also, as further work we could squash redundant prototypes, but first ensure that functionality is working properly; then should we optimize. This may seem like a huge patch, sorry about that. But, most of the changes are new tests, changes in the production code is not that much. I also tried to create a smaller patch which does not affect specializations, but that patch failed to pass some of the `clang-import-test`s because there we import function specializations. Also very importantly, we can't just change the import of `FunctionDecl`s without changing the import of function template specializations because they are handled as `FunctionDecl`s. Reviewers: a.sidorin, r.stahl, xazax.hun, balazske Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47532 llvm-svn: 335480
* [ASTImporter] Corrected lookup at import of templated record declGabor Marton2018-05-301-1/+8
| | | | | | | | | | | | | | | | | | Summary: When a CXXRecordDecl under ClassTemplateDecl is imported, check the templated record decl for similarity instead of the template. Reviewers: a.sidorin Reviewed By: a.sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D47313 Patch by Balazs Keri! llvm-svn: 333522
* Testing commit access with whitespace change.Rafael Stahl2018-05-291-2/+2
| | | | llvm-svn: 333396
* [ASTImporter] Fix ClassTemplateSpecialization in wrong DCGabor Marton2018-05-251-2/+6
| | | | | | | | | | | | | | Summary: ClassTemplateSpecialization is put in the wrong DeclContex if implicitly instantiated. This patch fixes it. Reviewers: a.sidorin, r.stahl, xazax.hun Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47058 llvm-svn: 333269
* [ASTImporter] Fix missing implict CXXRecordDecl in ↵Gabor Marton2018-05-231-2/+8
| | | | | | | | | | | | | | | | ClassTemplateSpecializationDecl Summary: Currently we do not import the implicit CXXRecordDecl of a ClassTemplateSpecializationDecl. This patch fixes it. Reviewers: a.sidorin, xazax.hun, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47057 llvm-svn: 333086
* Fix duplicate class template definitions problemGabor Marton2018-05-231-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We fail to import a `ClassTemplateDecl` if the "To" context already contains a definition and then a forward decl. This is because `localUncachedLookup` does not find the definition. This is not a lookup error, the parser behaves differently than assumed in the importer code. A `DeclContext` contains one DenseMap (`LookupPtr`) which maps names to lists. The list is a special list `StoredDeclsList` which is optimized to have one element. During building the initial AST, the parser first adds the definition to the `DeclContext`. Then during parsing the second declaration (the forward decl) the parser again calls `DeclContext::addDecl` but that will not add a new element to the `StoredDeclsList` rarther it simply overwrites the old element with the most recent one. This patch fixes the error by finding the definition in the redecl chain. Added tests for the same issue with `CXXRecordDecl` and with `ClassTemplateSpecializationDecl`. These tests pass and they pass because in `VisitRecordDecl` and in `VisitClassTemplateSpecializationDecl` we already use `D->getDefinition()` after the lookup. Reviewers: a.sidorin, xazax.hun, szepet Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D46950 llvm-svn: 333082
* [ASTImporter] Fix missing implict CXXRecordDeclGabor Marton2018-05-171-1/+1
| | | | | | | | | | | | | | Summary: Implicit CXXRecordDecl is not added to its DeclContext during import, but in the original AST it is. This patch fixes this. Reviewers: xazax.hun, a.sidorin, szepet Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D46958 llvm-svn: 332588
* Test commit access: remove superflous spacesGabor Marton2018-05-161-1/+1
| | | | llvm-svn: 332454
* [ASTImporter] Extend lookup logic in class templatesAleksei Sidorin2018-05-151-2/+8
| | | | | | | | | | | | | | During import of a class template, lookup may find a forward declaration and structural match falsely reports equivalency between a forward decl and a definition. The result is that some definitions are not imported if we had imported a forward decl previously. This patch gives a fix. Patch by Gabor Marton! Differential Revision: https://reviews.llvm.org/D46353 llvm-svn: 332338
* [AST] Print correct tag decl for tag specifierJoel E. Denny2018-05-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: void fn() { struct T *p0; struct T { int i; } *p1; } -ast-print produced: void fn() { struct T { int i; } *p0; struct T { int i; } *p1; } Compiling that fails with a redefinition error. Given: void fn() { struct T *p0; struct __attribute__((deprecated)) T *p1; } -ast-print dropped the attribute. Details: For a tag specifier (that is, struct/union/class/enum used as a type specifier in a declaration) that was also a tag declaration (that is, first occurrence of the tag) or tag redeclaration (that is, later occurrence that specifies attributes or a member list), clang printed the tag specifier as either (1) the full tag definition if one existed, or (2) the first tag declaration otherwise. Redefinition errors were sometimes introduced, as in the first example above. Even when that was impossible because no member list was ever specified, attributes were sometimes lost, thus changing semantics and diagnostics, as in the second example above. This patch fixes a major culprit for these problems. It does so by creating an ElaboratedType with a new OwnedDecl member wherever an occurrence of a tag type is a (re)declaration of that tag type. PrintingPolicy's IncludeTagDefinition used to trigger printing of the member list, attributes, etc. for a tag specifier by using a tag (re)declaration selected as described above. Now, it triggers the same thing except it uses the tag (re)declaration stored in the OwnedDecl. Of course, other tooling can now make use of the new OwnedDecl as well. Also, to be more faithful to the original source, this patch suppresses printing of attributes inherited from previous declarations. Reviewed by: rsmith, aaron.ballman Differential Revision: https://reviews.llvm.org/D45463 llvm-svn: 332281
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-4/+4
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* [ASTImporter] Properly import SourceLocations of AttrsAleksei Sidorin2018-05-081-13/+12
| | | | | | | | Patch by Rafael Stahl! Differential Revision: https://reviews.llvm.org/D46115 llvm-svn: 331762
* [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, ↵Peter Szecsi2018-05-071-1/+86
| | | | | | | | | | DependentScopeDeclRefExpr The visit callback implementations for the 3 C++ AST Node added to the ASTImporter. Differential Revision: https://reviews.llvm.org/D38845 llvm-svn: 331630
* [ASTImporter] Fix isa cast assertPeter Szecsi2018-05-021-3/+7
| | | | | | | | | | | | | | | | | | | | | | | Do early return if we can't import the found decl for a member expr. This follows the pre-existing scheme, e.g with E->getMemberDecl(). E->getFoundDecl().getDecl() can be null when a member expression does not involve lookup. It may involve a lookup in case of a using directive which refers to a member function in a base class template. We faced this assert during the CTU analysis of google::protobuf v3.5.2. We tried hard to synthesize a minimal test example both by hand and by executing creduce on multiple files. Unfortunately, we were unable to reduce to such a minimal example, yet. Nevertheless, this fix solved the problem in protobuf. To reproduce the error one must execute the analyzer with -Xclang -analyzer-config -Xclang experimental-enable-naive-ctu-analysis=true -Xclang -analyzer-config -Xclang ctu-dir=/path/to/ctu_dir Patch by Gabor Marton! Differential Revision: https://reviews.llvm.org/D46019 llvm-svn: 331344
* [ASTImporter] FriendDecl importing improvementsPeter Szecsi2018-04-251-5/+9
| | | | | | | | | | There are only a few cases of importing a frienddecl which is currently supported. This patch aims to improve the friend import process. Set FriendObjectKind in case of decls, insert friend into the friend chain correctly, checks structurally equivalent in a more advanced manner. Test cases added as well. llvm-svn: 330847
* [ASTImporter] Allow testing of import sequences; fix import of typedefs for ↵Aleksei Sidorin2018-04-241-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | anonymous decls This patch introduces the ability to test an arbitrary sequence of imports between a given set of virtual source files. This should finally allow us to write simple tests and fix annoying issues inside ASTImporter that cause failures in CSA CTU. This is done by refactoring ASTImporterTest functions and introducing `testImportSequence` facility. As a side effect, `testImport` facility was generalized a bit more. It should now allow import of non-decl AST nodes; however, there is still no test using this ability. As a "test for test", there is also a fix for import anonymous TagDecls referred by typedef. Before this patch, the setting of typedef for anonymous structure was delayed; however, this approach misses the corner case if an enum constant is imported directly. In this patch, typedefs for anonymous declarations are imported right after the anonymous declaration is imported, without any delay. Thanks to Adam Balogh for suggestions included into this patch. Differential Revision: https://reviews.llvm.org/D44079 llvm-svn: 330704
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2018-04-091-407/+405
| | | | | | minor fixes (NFC). llvm-svn: 329628
* DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standardRichard Smith2018-04-051-1/+4
| | | | | | | | | | | | | | | | | layout" rules. The new rules say that a standard-layout struct has its first non-static data member and all base classes at offset 0, and consider a class to not be standard-layout if that would result in multiple subobjects of a single type having the same address. We track "is C++11 standard-layout class" separately from "is standard-layout class" so that the ABIs that need this information can still use it. Differential Revision: https://reviews.llvm.org/D45176 llvm-svn: 329332
* [ASTImporter] Fix for importing unnamed structsAleksei Sidorin2018-04-051-3/+2
| | | | | | | | Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D30876 llvm-svn: 329301
* [ObjC] Allow declaring __weak pointer fields in C structs in ARC.Akira Hatanaka2018-03-191-1/+0
| | | | | | | | | | | | | | | | | | | This patch uses the infrastructure added in r326307 for enabling non-trivial fields to be declared in C structs to allow __weak fields in C structs in ARC. This recommits r327206, which was reverted because it caused module-enabled builders to fail. I discovered that the CXXRecordDecl::CanPassInRegisters flag wasn't being set correctly in some cases after I moved it to RecordDecl. Thanks to Eric Liu for helping me investigate the bug. rdar://problem/33599681 https://reviews.llvm.org/D44095 llvm-svn: 327870
* Revert "[ObjC] Allow declaring __weak pointer fields in C structs inAkira Hatanaka2018-03-121-0/+1
| | | | | | | | | | | ARC." This reverts commit r327206 as there were test failures caused by this patch. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180312/221427.html llvm-svn: 327294
* [ObjC] Allow declaring __weak pointer fields in C structs in ARC.Akira Hatanaka2018-03-101-1/+0
| | | | | | | | | | | | This patch uses the infrastructure added in r326307 for enabling non-trivial fields to be declared in C structs to allow __weak fields in C structs in ARC. rdar://problem/33599681 Differential Revision: https://reviews.llvm.org/D44095 llvm-svn: 327206
* Quick fix for 325116 buildbots: move template specialization into namespaceAleksei Sidorin2018-02-141-27/+29
| | | | llvm-svn: 325118
* [ASTImporter] Fix lexical DC for templated decls; support ↵Aleksei Sidorin2018-02-141-50/+109
| | | | | | | | | | VarTemplatePartialSpecDecl Also minor refactoring in related functions was done. Differential Revision: https://reviews.llvm.org/D43012 llvm-svn: 325116
* [ASTImporter] Add support to import some AST nodes:Gabor Horvath2018-01-271-23/+108
| | | | | | | | | | | | | | | | * CXXOperatorCallExpr * SizeOfPackExpr * DependentTemplateSpecializationType * DependentSizedArray * CXXTypeidExpr * Fix importing CXXTemporaryObjectExpr Some of the changes are based on https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/AST/ASTImporter.cpp Differential Revision: https://reviews.llvm.org/D42335 llvm-svn: 323589
* [ASTImporter] avoid warnings: unused var, switch coveredSam McCall2018-01-261-8/+5
| | | | llvm-svn: 323524
* [ASTImporter] Support LambdaExprs and improve template supportAleksei Sidorin2018-01-261-53/+258
| | | | | | | | | | | | | | Also, a number of style and bug fixes was done: * ASTImporterTest: added sanity check for source node * ExternalASTMerger: better lookup for template specializations * ASTImporter: don't add templated declarations into DeclContext * ASTImporter: introduce a helper, ImportTemplateArgumentListInfo getting SourceLocations * ASTImporter: proper set ParmVarDecls for imported FunctionProtoTypeLoc Differential Revision: https://reviews.llvm.org/D42301 llvm-svn: 323519
* [ASTImporter] Support importing CXXUnresolvedConstructExpr and ↵Aleksei Sidorin2018-01-091-0/+61
| | | | | | | | | | | | | UnresolvedLookupExpr * Note: This solution is based on https://github.com/haoNoQ/clang/blob/summary-ipa-draft/lib/AST/ASTImporter.cpp#L7605. Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D38694 llvm-svn: 322091
OpenPOWER on IntegriCloud