aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-01-01 17:44:25 +0000
committerDouglas Gregor <dgregor@apple.com>2010-01-01 17:44:25 +0000
commite3582011a63a78cdfa0917077ed87ccb9b3a87b5 (patch)
tree418e9df855e647c4a7f7f0b7aa85c87a3458cf14 /lib/Sema/SemaLookup.cpp
parent736fc1b5884158387bfc49b8958ebc07b526d1da (diff)
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 1419ceb4b6..b86b31896c 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -1966,8 +1966,7 @@ static void LookupVisibleDecls(Scope *S, LookupResult &Result,
return;
DeclContext *Entity = 0;
- if (S->getEntity() &&
- !((DeclContext *)S->getEntity())->isFunctionOrMethod()) {
+ if (S->getEntity()) {
// Look into this scope's declaration context, along with any of its
// parent lookup contexts (e.g., enclosing classes), up to the point
// where we hit the context stored in the next outer scope.