From bc4c1078365b6fd6cc9b1ddaa9c4800dc9735694 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 16 Aug 2009 01:56:34 +0000 Subject: Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change. llvm-svn: 79157 --- clang/lib/Sema/SemaOverload.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'clang/lib/Sema/SemaOverload.cpp') diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index faf4d82a8b1..d45e54a4a53 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -4343,7 +4343,10 @@ Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE, RParenLoc)) return true; - return CheckFunctionCall(Method, TheCall.take()).release(); + if (CheckFunctionCall(Method, TheCall.get())) + return true; + + return TheCall.release(); } /// BuildCallToObjectOfClassType - Build a call to an object of class @@ -4549,7 +4552,10 @@ Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Object, if (IsError) return true; - return CheckFunctionCall(Method, TheCall.take()).release(); + if (CheckFunctionCall(Method, TheCall.get())) + return true; + + return TheCall.release(); } /// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator-> -- cgit v1.2.3