Restrict creation of OverloadedFunctionDecl only to C++ (it was getting used for invalid redeclarations on C).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Argyrios Kyrtzidis 2008-10-22 23:08:24 +00:00
Родитель 8970feab05
Коммит f1af6a70c3
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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