Add Sema::isDeclInScope which wraps IdentifierResolver::isDeclInScope.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56014 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 1397742..f7c9a99 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -301,6 +301,13 @@
/// Add this decl to the scope shadowed decl chains.
void PushOnScopeChains(NamedDecl *D, Scope *S);
+ /// 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.
+ bool isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S = 0) {
+ return IdResolver.isDeclInScope(D, Ctx, S);
+ }
+
/// Subroutines of ActOnDeclarator().
TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D, QualType T,
ScopedDecl *LastDecl);