aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-19 21:07:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-19 21:07:14 +0000
commitbf1cbaf1b0ac9d967ff6abf27788cc98f0f5e7da (patch)
tree2713ba8459bb2f33d0cbcd89e2b77a3e0975d800 /lib/Sema/SemaLookup.cpp
parent8f43d52b46b600b2eb4e62550f7a6d7a78fd001b (diff)
Revert r104117, "Provide a naming class for UnresolvedLookupExprs, even when
occuring on..." which breaks some Objective-C code. Working on getting a test case... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index b25ecb1e06..774a82b7c7 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -665,8 +665,6 @@ bool Sema::CppLookupName(LookupResult &R, Scope *S) {
//
DeclContext *OutsideOfTemplateParamDC = 0;
for (; S && !isNamespaceOrTranslationUnitScope(S); S = S->getParent()) {
- DeclContext *Ctx = static_cast<DeclContext*>(S->getEntity());
-
// Check whether the IdResolver has anything in this scope.
bool Found = false;
for (; I != IEnd && S->isDeclScope(DeclPtrTy::make(*I)); ++I) {
@@ -677,11 +675,10 @@ bool Sema::CppLookupName(LookupResult &R, Scope *S) {
}
if (Found) {
R.resolveKind();
- if (S->isClassScope())
- R.setNamingClass(dyn_cast<CXXRecordDecl>(Ctx));
return true;
}
+ DeclContext *Ctx = static_cast<DeclContext*>(S->getEntity());
if (!Ctx && S->isTemplateParamScope() && OutsideOfTemplateParamDC &&
S->getParent() && !S->getParent()->isTemplateParamScope()) {
// We've just searched the last template parameter scope and