[cfe-commits] r41136 - in /cfe/trunk: AST/ASTContext.cpp AST/Builtins.cpp Sema/Sema.h Sema/SemaChecking.cpp Sema/SemaExpr.cpp include/clang/AST/ASTContext.h include/clang/AST/Builtins.def include/clang/Basic/DiagnosticKinds.def test/Sema/cfstring.c

Chris Lattner clattner at apple.com
Fri Aug 17 08:27:35 PDT 2007


On Aug 16, 2007, at 10:31 PM, Anders Carlsson wrote:

> +++ cfe/trunk/Sema/SemaExpr.cpp Fri Aug 17 00:31:46 2007
> @@ -561,7 +561,8 @@
>    if (ImplicitCastExpr *IcExpr = dyn_cast<ImplicitCastExpr>(Fn))
>      if (DeclRefExpr *DRExpr = dyn_cast<DeclRefExpr>(IcExpr- 
> >getSubExpr()))
>        if (FunctionDecl *FDecl = dyn_cast<FunctionDecl>(DRExpr- 
> >getDecl()))
> -        CheckFunctionCall(Fn, LParenLoc, RParenLoc, FDecl, Args,  
> NumArgsInCall);
> +        if (!CheckFunctionCall(Fn, LParenLoc, RParenLoc, FDecl,  
> Args, NumArgsInCall))
> +          return true;
>

Very nice Anders!  One (more) request:  Please invert the sense of  
the CheckFunctionCall result value.  We use "true" to mean error in  
other places, so it seems a bit strange for it to use true as success.

Thanks for working on this!

-Chris



More information about the cfe-commits mailing list