summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-01 21:35:00 +0000
commit123063377428540752bad91c7fbd536a762e31bd (patch)
treef131a156bf0b3912bc02dd7adaf4898c01c8a119 /lib/Sema/SemaExprCXX.cpp
parentd1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (diff)
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index b2fb33f53432..3de677e37ba2 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -6712,6 +6712,11 @@ ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl,
CXXMemberCallExpr *CE =
new (Context) CXXMemberCallExpr(Context, ME, None, ResultType, VK,
Exp.get()->getLocEnd());
+
+ if (CheckFunctionCall(Method, CE,
+ Method->getType()->castAs<FunctionProtoType>()))
+ return ExprError();
+
return CE;
}