summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-07 00:45:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-07 00:45:52 +0000
commita3271c139058c7d98a0147df5e17164141d8e699 (patch)
treebdfb1d85c7f1fef6a8a29dc97a2177244e01e1da /clang/lib/AST
parente7e2abe6a2783be04cb07a82ef0be2565c42cf9d (diff)
downloadbcm5719-llvm-a3271c139058c7d98a0147df5e17164141d8e699.tar.gz
bcm5719-llvm-a3271c139058c7d98a0147df5e17164141d8e699.zip
[modules] Don't accidentally trigger deserialization from DeclContext::noload_lookup.
llvm-svn: 228475
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclBase.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index a46787fb0e8..8862f9f5c62 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -1251,7 +1251,7 @@ StoredDeclsMap *DeclContext::buildLookup() {
collectAllContexts(Contexts);
for (unsigned I = 0, N = Contexts.size(); I != N; ++I)
buildLookupImpl<&DeclContext::decls_begin,
- &DeclContext::decls_end>(Contexts[I]);
+ &DeclContext::decls_end>(Contexts[I], false);
// We no longer have any lazy decls.
LookupPtr.setInt(false);
@@ -1264,7 +1264,7 @@ StoredDeclsMap *DeclContext::buildLookup() {
/// nested within it.
template<DeclContext::decl_iterator (DeclContext::*Begin)() const,
DeclContext::decl_iterator (DeclContext::*End)() const>
-void DeclContext::buildLookupImpl(DeclContext *DCtx) {
+void DeclContext::buildLookupImpl(DeclContext *DCtx, bool Internal) {
for (decl_iterator I = (DCtx->*Begin)(), E = (DCtx->*End)();
I != E; ++I) {
Decl *D = *I;
@@ -1282,14 +1282,14 @@ void DeclContext::buildLookupImpl(DeclContext *DCtx) {
(!ND->isFromASTFile() ||
(isTranslationUnit() &&
!getParentASTContext().getLangOpts().CPlusPlus)))
- makeDeclVisibleInContextImpl(ND, false);
+ makeDeclVisibleInContextImpl(ND, Internal);
// If this declaration is itself a transparent declaration context
// or inline namespace, add the members of this declaration of that
// context (recursively).
if (DeclContext *InnerCtx = dyn_cast<DeclContext>(D))
if (InnerCtx->isTransparentContext() || InnerCtx->isInlineNamespace())
- buildLookupImpl<Begin, End>(InnerCtx);
+ buildLookupImpl<Begin, End>(InnerCtx, Internal);
}
}
@@ -1369,7 +1369,7 @@ DeclContext::noload_lookup(DeclarationName Name) {
collectAllContexts(Contexts);
for (unsigned I = 0, N = Contexts.size(); I != N; ++I)
buildLookupImpl<&DeclContext::noload_decls_begin,
- &DeclContext::noload_decls_end>(Contexts[I]);
+ &DeclContext::noload_decls_end>(Contexts[I], true);
// We no longer have any lazy decls.
LookupPtr.setInt(false);
@@ -1555,7 +1555,7 @@ void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal) {
return;
}
- else if (DeclNameEntries.isNull()) {
+ if (DeclNameEntries.isNull()) {
DeclNameEntries.setOnlyValue(D);
return;
}
OpenPOWER on IntegriCloud