diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-01-24 02:03:08 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-01-24 02:03:08 +0000 |
commit | d24d5f2b7979087908a59dc35807aba99905536b (patch) | |
tree | bd4ce0b022702d1fd3455d509a97a1e7b0844682 /clang/lib/Sema/SemaOverload.cpp | |
parent | e112151a3582657ed7a441bcb3b874402cb14ffd (diff) | |
download | bcm5719-llvm-d24d5f2b7979087908a59dc35807aba99905536b.tar.gz bcm5719-llvm-d24d5f2b7979087908a59dc35807aba99905536b.zip |
Start checking nonnull (as well as format and argument_with_type_tag) on
overloaded binary operators.
llvm-svn: 173315
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 91d02dacc82..e1c3d6839d1 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -10336,6 +10336,13 @@ Sema::CreateOverloadedBinOp(SourceLocation OpLoc, FnDecl)) return ExprError(); + ArrayRef<const Expr *> ArgsArray(Args, 2); + // Cut off the implicit 'this'. + if (isa<CXXMethodDecl>(FnDecl)) + ArgsArray = ArgsArray.slice(1); + checkCall(FnDecl, ArgsArray, 0, isa<CXXMethodDecl>(FnDecl), OpLoc, + TheCall->getSourceRange(), VariadicDoesNotApply); + return MaybeBindToTemporary(TheCall); } else { // We matched a built-in operator. Convert the arguments, then |