summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2013-06-22 02:30:38 +0000
committerRichard Trieu <rtrieu@google.com>2013-06-22 02:30:38 +0000
commit9be9c6804f514219ef486f730e0d16dc483ab030 (patch)
tree9f8bea5ae78bedad04c2235822e66525ee02538f /clang/lib/Sema
parent57d1c4865ef17da367f35eee467e78d15cd0e800 (diff)
downloadbcm5719-llvm-9be9c6804f514219ef486f730e0d16dc483ab030.tar.gz
bcm5719-llvm-9be9c6804f514219ef486f730e0d16dc483ab030.zip
Extend -Wnon-pod-varargs to check calls made from member pointers.
llvm-svn: 184629
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp3
-rw-r--r--clang/lib/Sema/SemaOverload.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index a960a3d8084..27e8962f71b 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -3798,7 +3798,8 @@ Sema::getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto,
if (CXXMethodDecl *Method = dyn_cast_or_null<CXXMethodDecl>(FDecl))
if (Method->isInstance())
return VariadicMethod;
- }
+ } else if (Fn && Fn->getType() == Context.BoundMemberTy)
+ return VariadicMethod;
return VariadicFunction;
}
return VariadicDoesNotApply;
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index b9daba95f69..29644b40b74 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -10895,6 +10895,9 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
if (ConvertArgumentsForCall(call, op, 0, proto, Args, RParenLoc))
return ExprError();
+ if (CheckOtherCall(call, proto))
+ return ExprError();
+
return MaybeBindToTemporary(call);
}
OpenPOWER on IntegriCloud