diff options
-rw-r--r-- | lib/Sema/IdentifierResolver.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/IdentifierResolver.h b/lib/Sema/IdentifierResolver.h index da1327be48..7ba252b5bc 100644 --- a/lib/Sema/IdentifierResolver.h +++ b/lib/Sema/IdentifierResolver.h @@ -321,13 +321,13 @@ public: return ctx_iterator(IDI->decls_begin()); } - /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true
- /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns
- /// true if 'D' belongs to the given declaration context.
+ /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true + /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns + /// true if 'D' belongs to the given declaration context. static bool isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S = 0) { - if (Ctx->isFunctionOrMethod())
- return S->isDeclScope(D);
-
+ if (Ctx->isFunctionOrMethod()) + return S->isDeclScope(D); + return LookupContext(D) == LookupContext(Ctx); } |