summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST
Commit message (Collapse)AuthorAgeFilesLines
* [clang] Remove raw string literals in macrosOliver Stannard2020-01-131-67/+83
| | | | | Older (but still supported) versions of GCC don't handle C++11 raw string literals in macro parameters correctly.
* Customize simplified dumping and matching of LambdaExprStephen Kelly2019-12-211-0/+119
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
* Revert "Customize simplified dumping and matching of LambdaExpr"Stephen Kelly2019-12-201-119/+0
| | | | This reverts commit 494b1318ca77927e919bbf9a61749a58553d738c.
* Customize simplified dumping and matching of LambdaExprStephen Kelly2019-12-201-0/+119
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
* Add method to ignore invisible AST nodesStephen Kelly2019-12-182-0/+236
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70613
* Trim trailing whitespaceStephen Kelly2019-12-181-2/+2
|
* Output names in the AST in testsStephen Kelly2019-12-181-3/+13
|
* recommit: [ASTImporter] Friend class decl should not be visible in its contextGabor Marton2019-12-181-6/+44
| | | | | | | | | | | | | | | | | | | Summary: In the past we had to use DeclContext::makeDeclVisibleInContext to make friend declarations available for subsequent lookup calls and this way we could chain (redecl) the structurally equivalent decls. By doing this we created an AST that improperly made declarations visible in some contexts, so the AST was malformed. Since we use the importer specific lookup this is no longer necessary, because with that we can find every previous nodes. Reviewers: balazske, a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71020
* Revert "[ASTImporter] Friend class decl should not be visible in its context"Nico Weber2019-12-171-44/+6
| | | | | This reverts commit 4becf68c6f17fe143539ceac954b21175914e1c1. Breaks building on Windows, see comments on D71020
* [ASTImporter] Friend class decl should not be visible in its contextGabor Marton2019-12-171-6/+44
| | | | | | | | | | | | | | | | | | | Summary: In the past we had to use DeclContext::makeDeclVisibleInContext to make friend declarations available for subsequent lookup calls and this way we could chain (redecl) the structurally equivalent decls. By doing this we created an AST that improperly made declarations visible in some contexts, so the AST was malformed. Since we use the importer specific lookup this is no longer necessary, because with that we can find every previous nodes. Reviewers: balazske, a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71020
* [ASTImporter] Support functions with placeholder return types ...Gabor Marton2019-12-124-0/+195
| | | | | | | | | | | | | | | Summary: Support functions with placeholder return types even in cases when the type is declared in the body of the function. Example: auto f() { struct X{}; return X(); } Reviewers: balazske, a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70819
* [ASTImporter] Implicitly declare parameters for imported ObjCMethodDeclsRaphael Isemann2019-12-062-1/+27
| | | | | | | | | | | | | | | | | | | | Summary: When Sema encounters a ObjCMethodDecl definition it declares the implicit parameters for the ObjCMethodDecl. When importing such a method with the ASTImporter we need to do the same for the imported method otherwise we will crash when generating code (where CodeGen expects that this was called by Sema). Note I had to implement Objective-C[++] support in Language.cpp as this is the first test for Objective-C and this would otherwise just hit this 'not implemented' assert when running the unit test. Reviewers: martong, a.sidorin, shafik Reviewed By: martong Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71112
* Add FunctionDecl::getParameterSourceRange()Nicolas Manichon2019-12-031-0/+106
| | | | | This source range covers the list of parameters of the function declaration, including the ellipsis for a variadic function.
* [Clang][ASTImporter] Added visibility check for ClassTemplateDecl.Balázs Kéri2019-11-151-1/+31
| | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between class templates with same name in different translation units if these are not visible outside. Reviewers: martong, a.sidorin, shafik Reviewed By: martong Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67543
* [AST] Use written names instead of `type-param-0-0` in more cases when ↵Sam McCall2019-11-151-2/+1
| | | | | | | | | | | | | | | | | | | printing types and decls. Summary: This doesn't cover decls in diagnostics, which use NamedDecl::getNameForDiagnostic(). (That should also be fixed later I think). This covers some cases of https://github.com/clangd/clangd/issues/76 (hover, but not outline or sighelp) Reviewers: hokein Subscribers: ilya-biryukov, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70236
* Prune include of DataLayout.h from include/clang/Basic/TargetInfo.h. NFCBjorn Pettersson2019-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Use a forward declaration of DataLayout instead of including DataLayout.h in clangs TargetInfo.h. This reduces include dependencies toward DataLayout.h (and other headers such as DerivedTypes.h, Type.h that is included by DataLayout.h). Needed to move implemantation of TargetInfo::resetDataLayout from TargetInfo.h to TargetInfo.cpp. Reviewers: rnk Reviewed By: rnk Subscribers: jvesely, nhaehnle, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69262 llvm-svn: 375438
* [ASTImporter][NFC] Enable disabled but passing testGabor Marton2019-10-071-4/+1
| | | | | | RedeclChainShouldBeCorrectAmongstNamespaces llvm-svn: 373896
* Fix memory leak in DeclTest.Evgeniy Stepanov2019-09-251-1/+2
| | | | | | | | | | | | Fixes a leak introduced in r372903, detected on the ASan bot. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35430/steps/check-clang%20asan/logs/stdio Direct leak of 192 byte(s) in 1 object(s) allocated from: #0 0x561d88 in operator new(unsigned long) /b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105 #1 0x1a48779 in clang::ItaniumMangleContext::create(clang::ASTContext&, clang::DiagnosticsEngine&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ItaniumMangle.cpp:5134:10 #2 0xdff000 in Decl_AsmLabelAttr_Test::TestBody() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/unittests/AST/DeclTest.cpp:97:23 llvm-svn: 372925
* [Mangle] Add flag to asm labels to disable '\01' prefixingVedant Kumar2019-09-251-0/+49
| | | | | | | | | | | | | | LLDB synthesizes decls using asm labels. These decls cannot have a mangle different than the one specified in the label name. I.e., the '\01' prefix should not be added. Fixes an expression evaluation failure in lldb's TestVirtual.py on iOS. rdar://45827323 Differential Revision: https://reviews.llvm.org/D67774 llvm-svn: 372903
* Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-251-12/+58
| | | | | | | | | | Decl::printQualifiedName Reverted in r372880 due to the test failure. Also contains a fix that adjusts printQualifiedName to return the same results as before in case of anonymous function locals and parameters. llvm-svn: 372889
* Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-251-58/+12
| | | | | | | Decl::printQualifiedName Reason: causes a test failure, will investigate and re-land with a fix. llvm-svn: 372880
* [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-251-12/+58
| | | | | | | | | | | | | | | | | | | | | Decl::printQualifiedName Summary: To be used in clangd, e.g. in D66647. Currently the alternative to this function is doing string manipulation on results of `printQualifiedName`, which is hard-to-impossible to get right in presence of template arguments. Reviewers: kadircet, aaron.ballman Reviewed By: kadircet, aaron.ballman Subscribers: aaron.ballman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67825 llvm-svn: 372863
* [ASTImporter] 4th attempt to fix Windows buildbot test errorsGabor Marton2019-09-241-4/+8
| | | | llvm-svn: 372705
* [ASTImporter] 3rd attempt to fix Windows buildbot test errorsGabor Marton2019-09-241-4/+6
| | | | llvm-svn: 372688
* [ASTImporter] 2nd attempt to fix Windows buildbot test errorsGabor Marton2019-09-231-2/+2
| | | | llvm-svn: 372646
* [ASTImporter] Attempt to fix Windows buildbot test errorsGabor Marton2019-09-231-2/+2
| | | | llvm-svn: 372633
* [ASTImporter][NFC] Add comprehensive tests for ODR violation handling strategiesGabor Marton2019-09-233-184/+671
| | | | | | | | | | | | | | | | | Summary: In this patch we provide additional and comprehensive tests for the ODR handling strategies. This is the continuation of https://reviews.llvm.org/D59692. Reviewers: shafik, a_sidorin, balazske, a.sidorin Subscribers: mgorny, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66951 llvm-svn: 372564
* [Clang][ASTImporter] Added visibility check for FunctionTemplateDecl.Balazs Keri2019-09-131-0/+44
| | | | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between function templates with same name in different translation units if these are not visible outside. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67490 llvm-svn: 371820
* Rename of constants in ASTImporterVisibilityTest. NFC.Balazs Keri2019-09-051-47/+55
| | | | | | | | | | | | | | Reviewers: martong, a.sidorin, shafik Reviewed By: shafik Subscribers: shafik, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67174 llvm-svn: 371021
* [ASTImporter] Added visibility context check for TypedefNameDecl.Balazs Keri2019-09-041-0/+41
| | | | | | | | | | | | | | | | | | | Summary: ASTImporter makes now difference between typedefs and type aliases with same name in different translation units if these are not visible outside. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: martong, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64480 llvm-svn: 370903
* [unittests][AST] CommentParser: don't name variable 'DEBUG'Roman Lebedev2019-09-021-2/+2
| | | | | | | It's may be an already-defined macro name, resulting in compilation errors. llvm-svn: 370650
* [AST] AST structural equivalence to work internally with pairs.Balazs Keri2019-09-021-0/+122
| | | | | | | | | | | | | | | | | | | | | Summary: The structural equivalence check stores now pairs of nodes in the 'from' and 'to' context instead of only the node in 'from' context and a corresponding one in 'to' context. This is needed to handle cases when a Decl in the 'from' context is to be compared with multiple Decls in the 'to' context. Reviewers: martong, a_sidorin Reviewed By: martong, a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66538 llvm-svn: 370639
* [ASTImporter] At import of records re-order indirect fields too.Balazs Keri2019-09-021-6/+34
| | | | | | | | | | | | | | | | | | Summary: Correct order of fields and indirect fields in imported RecordDecl is needed for correct work of record layout calculations. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: martong, a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66866 llvm-svn: 370621
* [ASTImporter] Do not look up lambda classesGabor Marton2019-08-301-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Consider this code: ``` void f() { auto L0 = [](){}; auto L1 = [](){}; } ``` First we import `L0` then `L1`. Currently we end up having only one CXXRecordDecl for the two different lambdas. And that is a problem if the body of their op() is different. This happens because when we import `L1` then lookup finds the existing `L0` and since they are structurally equivalent we just map the imported L0 to be the counterpart of L1. We have the same problem in this case: ``` template <typename F0, typename F1> void f(F0 L0 = [](){}, F1 L1 = [](){}) {} ``` In StructuralEquivalenceContext we could distinquish lambdas only by their source location in these cases. But we the lambdas are actually structrually equivalent they differn only by the source location. Thus, the solution is to disable lookup completely if the decl in the "from" context is a lambda. However, that could have other problems: what if the lambda is defined in a header file and included in several TUs? I think we'd have as many duplicates as many includes we have. I think we could live with that, because the lambda classes are TU local anyway, we cannot just access them from another TU. Reviewers: a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66348 llvm-svn: 370461
* [ASTImporter] Propagate errors during import of overridden methods.Balazs Keri2019-08-301-0/+44
| | | | | | | | | | | | | | | | | | | Summary: If importing overridden methods fails for a method it can be seen incorrectly as non-virtual. To avoid this inconsistency the method is marked with import error to avoid later use of it. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: martong, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66933 llvm-svn: 370457
* [Tooling] Migrated APIs that take ownership of objects to unique_ptrDmitri Gribenko2019-08-302-18/+18
| | | | | | | | | | Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960 llvm-svn: 370451
* ArrayRef'ized CompilerInvocation::CreateFromArgsDmitri Gribenko2019-08-271-1/+0
| | | | | | | | | | Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66797 llvm-svn: 370122
* [ASTImporter] Fix name conflict handling with different strategiesGabor Marton2019-08-273-22/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are numorous flaws about the name conflict handling, this patch attempts fixes them. Changes in details: * HandleNameConflict return with a false DeclarationName Hitherto we effectively never returned with a NameConflict error, even if the preceding StructuralMatch indicated a conflict. Because we just simply returned with the parameter `Name` in HandleNameConflict and that name is almost always `true` when converted to `bool`. * Add tests which indicate wrong NameConflict handling * Add to ConflictingDecls only if decl kind is different Note, we might not indicate an ODR error when there is an existing record decl and a enum is imported with same name. But there are other cases. E.g. think about the case when we import a FunctionTemplateDecl with name f and we found a simple FunctionDecl with name f. They overload. Or in case of a ClassTemplateDecl and CXXRecordDecl, the CXXRecordDecl could be the 'templated' class, so it would be false to report error. So I think we should report a name conflict error only when we are 100% sure of that. That is why I think it should be a general pattern to report the error only if the kind is the same. * Fix failing ctu test with EnumConstandDecl In ctu-main.c we have the enum class 'A' which brings in the enum constant 'x' with value 0 into the global namespace. In ctu-other.c we had the enum class 'B' which brought in the same name ('x') as an enum constant but with a different enum value (42). This is clearly an ODR violation in the global namespace. The solution was to rename the second enum constant. * Introduce ODR handling strategies Reviewers: a_sidorin, shafik Differential Revision: https://reviews.llvm.org/D59692 llvm-svn: 370045
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-143-3/+3
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [ASTImporter] Import additional flags for functions.Balazs Keri2019-08-131-0/+49
| | | | | | | | | | | | | | | | | | Summary: At AST import of function delcarations import the flags for defaulted and deleted. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65999 llvm-svn: 368655
* [ASTImporter] Fix for import of friend class template with definition.Balazs Keri2019-08-121-0/+44
| | | | | | | | | | | | | | | | | | | | | | Summary: If there is a friend class template "prototype" (forward declaration) and later a definition for it in the existing code, this existing definition may be not found by ASTImporter because it is not linked to the prototype (under the friend AST node). The problem is fixed by looping over all found matching decls instead of break after the first found one. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65269 llvm-svn: 368551
* Add SVE opaque built-in typesRichard Sandiford2019-08-091-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the SVE built-in types defined by the Procedure Call Standard for the Arm Architecture: https://developer.arm.com/docs/100986/0000 It handles the types in all relevant places that deal with built-in types. At the moment, some of these places bail out with an error, including: (1) trying to generate LLVM IR for the types (2) trying to generate debug info for the types (3) trying to mangle the types using the Microsoft C++ ABI (4) trying to @encode the types in Objective C (1) and (2) are fixed by follow-on patches but (unlike this patch) they deal mostly with target-specific LLVM details, so seemed like a logically separate change. There is currently no spec for (3) and (4), so reporting an error seems like the correct behaviour for now. The intention is that the types will become sizeless types: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062523.html The main purpose of the sizeless type extension is to diagnose impossible or dangerous uses of the types, such as any that would require sizeof to have a meaningful defined value. Until then, the patch sets the alignments of the types to the values specified in the link above. It also sets the sizes of the types to zero, which is chosen to be consistently wrong and shouldn't affect correctly-written code (i.e. code that would compile even with the sizeless type extension). The patch adds the common subset of functionality needed to test the sizeless type extension on the one hand and to provide SVE intrinsic functions on the other. After this patch, the two pieces of work are essentially independent. The patch is based on one by Graham Hunter: https://reviews.llvm.org/D59245 Differential Revision: https://reviews.llvm.org/D62960 llvm-svn: 368413
* [ASTImporter] Do not import FunctionTemplateDecl in record twice.Balazs Keri2019-08-071-0/+46
| | | | | | | | | | | | | | | | | | | | | Summary: For functions there is a check to not duplicate the declaration if it is in a record (class). For function templates there was no similar check, if a template (in the same class) was imported multiple times the FunctionTemplateDecl was created multiple times with the same templated FunctionDecl. This can result in problems with the declaration chain. Reviewers: martong, a.sidorin, shafik, a_sidorin Reviewed By: a_sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65203 llvm-svn: 368163
* [clang] Fix mismatched args constructing AddressSpaceAttr.Anton Bikineev2019-08-071-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D65589 llvm-svn: 368152
* Remove inclusion of a private gmock header from a testDmitri Gribenko2019-08-071-1/+0
| | | | llvm-svn: 368132
* [AST] Traverse attributes inside DEF_TRAVERSE_DECL macroIlya Biryukov2019-08-062-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of traversing inside the TraverseDecl() function. Previously the attributes were traversed after Travese(Some)Decl returns. Logically attributes are properties of particular Decls and should be traversed alongside other "child" nodes. None of the tests relied on this behavior, hopefully this is an indication that the change is relatively safe. This change started with a discussion on cfe-dev, for details see: https://lists.llvm.org/pipermail/cfe-dev/2019-July/062899.html Reviewers: rsmith, gribozavr Reviewed By: gribozavr Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64907 llvm-svn: 368052
* [ASTImporter] Reorder fields after structure import is finishedGabor Marton2019-07-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | We reorder declarations in RecordDecls because they may have another order in the "to" context than they have in the "from" context. This may happen e.g when we import a class like this: struct declToImport { int a = c + b; int b = 1; int c = 2; }; During the import of `a` we import first the dependencies in sequence, thus the order would be `c`, `b`, `a`. We will get the normal order by first removing the already imported members and then adding them in the order as they apper in the "from" context. Keeping field order is vital because it determines structure layout. Reviewers: a_sidorin, shafik Tags: #clang Differential Revision: https://reviews.llvm.org/D44100 llvm-svn: 366997
* [ASTImporter] Fix inequivalence of ClassTemplateInstantiationsGabor Marton2019-07-231-0/+192
| | | | | | | | | | | | | | | | | | Summary: We falsely state inequivalence if the template parameter is a qualified/nonquialified template in the first/second instantiation. Also, different kinds of TemplateName should be equal if the template decl (if available) is equal (even if the name kind is different). Reviewers: a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64241 llvm-svn: 366818
* [ASTImporter] Fix structural eq of lambdasGabor Marton2019-07-172-0/+68
| | | | | | | | | | | | | | | | | | Summary: The structural equivalence check reported false eq between lambda classes with different parameters in their call signature. The solution is to check the methods for equality too in case of lambda classes. Reviewers: a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64075 llvm-svn: 366332
* [ASTImporter] Fix LLDB lookup in transparent ctx and with ext srcGabor Marton2019-07-171-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With LLDB we use localUncachedLookup(), however, that fails to find Decls when a transparent context is involved and the given DC has external lexical storage. The solution is to use noload_lookup, which works well with transparent contexts. But, we cannot use only the noload_lookup since the slow case of localUncachedLookup is still needed in some other cases. These other cases are handled in ASTImporterLookupTable, but we cannot use that with LLDB since that traverses through the AST which initiates the load of external decls again via DC::decls(). We must avoid loading external decls during the import becuase ExternalASTSource is implemented with ASTImporter, so external loads during import results in uncontrolled and faulty import. Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D61333 llvm-svn: 366325
OpenPOWER on IntegriCloud