aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-30 22:55:35 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-30 22:55:35 +0000
commit7dafdf51176d2f52e3a27f1ef70161ea2133ff52 (patch)
tree30fd10f4b45ca363d3616be96238ff6d30082960 /lib/Sema/SemaDecl.cpp
parent129e2df52ed7e0434b3f1cf1867fd6a5cb083ff6 (diff)
Remove all of Sema's explicit uses of OverloadedFunctionDecl except for
those associated with TemplateNames. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index c987a7f11c..520d7de710 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -401,37 +401,6 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) {
}
bool Sema::isDeclInScope(NamedDecl *&D, DeclContext *Ctx, Scope *S) {
- if (OverloadedFunctionDecl *Ovl = dyn_cast<OverloadedFunctionDecl>(D)) {
- // Look inside the overload set to determine if any of the declarations
- // are in scope. (Possibly) build a new overload set containing only
- // those declarations that are in scope.
- OverloadedFunctionDecl *NewOvl = 0;
- bool FoundInScope = false;
- for (OverloadedFunctionDecl::function_iterator F = Ovl->function_begin(),
- FEnd = Ovl->function_end();
- F != FEnd; ++F) {
- NamedDecl *FD = F->get();
- if (!isDeclInScope(FD, Ctx, S)) {
- if (!NewOvl && F != Ovl->function_begin()) {
- NewOvl = OverloadedFunctionDecl::Create(Context,
- F->get()->getDeclContext(),
- F->get()->getDeclName());
- D = NewOvl;
- for (OverloadedFunctionDecl::function_iterator
- First = Ovl->function_begin();
- First != F; ++First)
- NewOvl->addOverload(*First);
- }
- } else {
- FoundInScope = true;
- if (NewOvl)
- NewOvl->addOverload(*F);
- }
- }
-
- return FoundInScope;
- }
-
return IdResolver.isDeclInScope(D, Ctx, Context, S);
}
@@ -805,9 +774,6 @@ struct GNUCompatibleParamWarning {
///
/// Returns true if there was an error, false otherwise.
bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) {
- assert(!isa<OverloadedFunctionDecl>(OldD) &&
- "Cannot merge with an overloaded function declaration");
-
// Verify the old decl was also a function.
FunctionDecl *Old = 0;
if (FunctionTemplateDecl *OldFunctionTemplate
@@ -2237,8 +2203,6 @@ isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC,
if (!PrevDecl)
return 0;
- // FIXME: PrevDecl could be an OverloadedFunctionDecl, in which
- // case we need to check each of the overloaded functions.
if (!PrevDecl->hasLinkage())
return false;