summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-05-05 19:42:09 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-05-05 19:42:09 +0000
commit1debc468faf85bb551f4aa8f6b5940e74d0ae13d (patch)
tree175ea2e5d98bf6ddf1ee28f8fc2767d6e4646815 /clang
parenta5d52204976cc55c6ae340db08c5f778058c9566 (diff)
downloadbcm5719-llvm-1debc468faf85bb551f4aa8f6b5940e74d0ae13d.tar.gz
bcm5719-llvm-1debc468faf85bb551f4aa8f6b5940e74d0ae13d.zip
ArrayRef'ize Sema::CheckObjCMethodCall
Patch by Robert Wilhelm. llvm-svn: 181164
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Sema/Sema.h2
-rw-r--r--clang/lib/Sema/SemaChecking.cpp5
-rw-r--r--clang/lib/Sema/SemaExprObjC.cpp3
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index f851a7a35f7..d7c80f2e4f9 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -7384,7 +7384,7 @@ private:
bool CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
const FunctionProtoType *Proto);
bool CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation loc,
- Expr **Args, unsigned NumArgs);
+ ArrayRef<const Expr *> Args);
bool CheckBlockCall(NamedDecl *NDecl, CallExpr *TheCall,
const FunctionProtoType *Proto);
void CheckConstructorCall(FunctionDecl *FDecl,
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 6b809cfba2e..e14635ee25d 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -586,12 +586,11 @@ bool Sema::CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
}
bool Sema::CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation lbrac,
- Expr **Args, unsigned NumArgs) {
+ ArrayRef<const Expr *> Args) {
VariadicCallType CallType =
Method->isVariadic() ? VariadicMethod : VariadicDoesNotApply;
- checkCall(Method, llvm::makeArrayRef<const Expr *>(Args, NumArgs),
- Method->param_size(),
+ checkCall(Method, Args, Method->param_size(),
/*IsMemberFunction=*/false,
lbrac, Method->getSourceRange(), CallType);
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp
index b36586dacbd..cf77896cb8c 100644
--- a/clang/lib/Sema/SemaExprObjC.cpp
+++ b/clang/lib/Sema/SemaExprObjC.cpp
@@ -1326,7 +1326,8 @@ bool Sema::CheckMessageArgumentTypes(QualType ReceiverType,
DiagnoseSentinelCalls(Method, SelLoc, Args, NumArgs);
// Do additional checkings on method.
- IsError |= CheckObjCMethodCall(Method, SelLoc, Args, NumArgs);
+ IsError |= CheckObjCMethodCall(Method, SelLoc,
+ llvm::makeArrayRef<const Expr *>(Args, NumArgs));
return IsError;
}
OpenPOWER on IntegriCloud