aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-04 15:58:13 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-04 15:58:13 +0000
commit0d579b6a3f555c0e37e84e517c81eb9244fef099 (patch)
treed731f409635187d40b8b56eb8b7cf17c2027f38a /lib/Sema/SemaOverload.cpp
parente0ac7454bae910ab3d67a92f6e2e5046d3bb8c1a (diff)
In C++ keep unavailable function calls in the AST, like in C/ObjC.
This allows the migrator to visit and fix them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r--lib/Sema/SemaOverload.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp
index 153c0f8c24..4db75a3bda 100644
--- a/lib/Sema/SemaOverload.cpp
+++ b/lib/Sema/SemaOverload.cpp
@@ -8761,6 +8761,13 @@ Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE,
<< getDeletedOrUnavailableSuffix(Best->Function)
<< Fn->getSourceRange();
CandidateSet.NoteCandidates(*this, OCD_AllCandidates, Args, NumArgs);
+
+ // We emitted an error for the unvailable/deleted function call but keep
+ // the call in the AST.
+ FunctionDecl *FDecl = Best->Function;
+ Fn = FixOverloadedFunctionReference(Fn, Best->FoundDecl, FDecl);
+ return BuildResolvedCallExpr(Fn, FDecl, LParenLoc, Args, NumArgs,
+ RParenLoc, ExecConfig);
}
break;
}