aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 1befc2e2e9..df4ade090e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -95,7 +95,8 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S) {
IdResolver.AddShadowedDecl(TD, *I);
return;
}
- } else if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
+ } else if (getLangOptions().CPlusPlus && isa<FunctionDecl>(D)) {
+ FunctionDecl *FD = cast<FunctionDecl>(D);
// We are pushing the name of a function, which might be an
// overloaded name.
IdentifierResolver::iterator