aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 4cb58d8d19..7e32f17131 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -85,10 +85,11 @@ Action::TypeTy *Sema::getDestructorName(SourceLocation TildeLoc,
isDependent = SearchType->isDependentType();
} else {
LookupCtx = computeDeclContext(SS, EnteringContext);
- isDependent = LookupCtx->isDependentContext();
+ if (LookupCtx)
+ isDependent = LookupCtx->isDependentContext();
}
- LookInScope = false;
+ LookInScope = (LookupCtx == 0) && !isDependent;
} else if (ObjectTypePtr) {
// C++ [basic.lookup.classref]p3:
// If the unqualified-id is ~type-name, the type-name is looked up