summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4f2486353aa83c1472582fabfd33bf3b3d5a19a7 (patch)
treecdf4e2053bc34fed5eafe2eceb5634ee5090ccfe /clang/lib/Sema/SemaLookup.cpp
parent3f8f44757fd27e4c0436e55dd3270716377f95ba (diff)
downloadbcm5719-llvm-4f2486353aa83c1472582fabfd33bf3b3d5a19a7.tar.gz
bcm5719-llvm-4f2486353aa83c1472582fabfd33bf3b3d5a19a7.zip
Make sure that the search for visible declarations looks into the semantic parents of out-of-line function contexts
llvm-svn: 92397
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 1419ceb4b66..b86b31896c8 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud