summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3eaa22af578762dd43736d9fd19b2bcd3d2539ef (patch)
treed3137084f485a596a441630dd818a87a81ab707f /clang/lib/Sema/SemaOverload.cpp
parentd208ef95aa63230f3afbb65c3d73783313e96ba9 (diff)
downloadbcm5719-llvm-3eaa22af578762dd43736d9fd19b2bcd3d2539ef.tar.gz
bcm5719-llvm-3eaa22af578762dd43736d9fd19b2bcd3d2539ef.zip
In C++ keep unavailable function calls in the AST, like in C/ObjC.
This allows the migrator to visit and fix them. llvm-svn: 143699
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 153c0f8c24c..4db75a3bdac 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud