summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-01-28 21:59:15 +0000
committerHans Wennborg <hans@hanshq.net>2015-01-28 21:59:15 +0000
commit1b65aea306b46f7dabfda8c639c03a2d9e0ea42c (patch)
treef25f4d8d5a5e9df0b1b2c970a1a5366b44fda844 /lib/Sema/SemaExpr.cpp
parent3eedf3aeeb6677df482073037c44162c8dcd94e6 (diff)
Merging r227368:
------------------------------------------------------------------------ r227368 | rikka | 2015-01-28 13:10:46 -0800 (Wed, 28 Jan 2015) | 9 lines Revert a change from r222797 that is no longer needed and can cause infinite recursion. Also guard against said infinite recursion by adding an assert that will trigger if CorrectDelayedTyposInExpr is called before a previous call to CorrectDelayedTyposInExpr returns (i.e. if the TreeTransform run by CorrectDelayedTyposInExpr calls a sequence of methods that end up calling CorrectDelayedTyposInExpr, as the new test case had done prior to this commit). Fixes PR22292. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@227375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 93b4c30871..091fd27db8 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -4762,12 +4762,8 @@ Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
VK_RValue, RParenLoc);
// Bail out early if calling a builtin with custom typechecking.
- if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID)) {
- ExprResult Res = CorrectDelayedTyposInExpr(TheCall);
- if (!Res.isUsable() || !isa<CallExpr>(Res.get()))
- return Res;
- return CheckBuiltinFunctionCall(FDecl, BuiltinID, cast<CallExpr>(Res.get()));
- }
+ if (BuiltinID && Context.BuiltinInfo.hasCustomTypechecking(BuiltinID))
+ return CheckBuiltinFunctionCall(FDecl, BuiltinID, TheCall);
retry:
const FunctionType *FuncT;