diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2015-08-20 13:11:14 +0000 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2015-08-20 13:11:14 +0000 |
commit | 66be61ad4f3032495aa7fc29313bd81a0996b5ff (patch) | |
tree | 8086eb0f3676e04760b0458d437dc6b8db9e9a42 /clang/lib/Sema/SemaExpr.cpp | |
parent | 862b9b5239861f1991494057b779913869ee7b8d (diff) | |
download | bcm5719-llvm-66be61ad4f3032495aa7fc29313bd81a0996b5ff.tar.gz bcm5719-llvm-66be61ad4f3032495aa7fc29313bd81a0996b5ff.zip |
Fix crash with two typos in the arguments of a function
The problem is that the arguments are of TheCall are reset later
to the ones in Args, making TypoExpr put back. Some TypoExpr that have
already been diagnosed and will assert later in Sema::getTypoExprState
llvm-svn: 245560
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 76b9aecdac8..f7fa5d38a21 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -4937,6 +4937,7 @@ Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, if (!Result.isUsable()) return ExprError(); TheCall = dyn_cast<CallExpr>(Result.get()); if (!TheCall) return Result; + Args = ArrayRef<Expr *>(TheCall->getArgs(), TheCall->getNumArgs()); } // Bail out early if calling a builtin with custom typechecking. |