W dniu 17 listopada 2010 09:17 użytkownik Zhongxing Xu < [email protected]> napisał:
> Index: lib/Checker/GRExprEngine.cpp > =================================================================== > --- lib/Checker/GRExprEngine.cpp (revision 119383) > +++ lib/Checker/GRExprEngine.cpp (working copy) > @@ -2061,9 +2061,11 @@ > if (const PointerType *FnTypePtr = FnType->getAs<PointerType>()) > Proto = FnTypePtr->getPointeeType()->getAs<FunctionProtoType>(); > > - // Evaluate the arguments. > + // Evaluate the arguments. For a method call treat the first argument > + // as a lvalue. > ExplodedNodeSet ArgsEvaluated; > - EvalArguments(CE->arg_begin(), CE->arg_end(), Proto, Pred, > ArgsEvaluated); > + EvalArguments(CE->arg_begin(), CE->arg_end(), Proto, Pred, > ArgsEvaluated, > + dyn_cast_or_null<CXXMethodDecl>(CE->getCalleeDecl())); > > This part is not necessary, since CXXOperatorCallExpr would be visited in > its own method. > > Other parts of the patch are good to apply. > > 'kay, thanks. I'll do that and separate method for CXXOperatorCallExpr in the evening (my time). > > 2010/11/17 Marcin Świderski <[email protected]> > >> W dniu 17 listopada 2010 04:33 użytkownik Zhongxing Xu < >> [email protected]> napisał: >> >> I guess we shouldn't handle CXXOperatorCallExpr in VisitCall(). It should >>> has it own code path, like CXXMemberCallExpr. >>> >>> 2010/11/17 Marcin Świderski <[email protected]> >>> >>>> Patch: For an operator call that really is a method call treat the first >>>> argument as a lvalue. >>>> >>>> Please approve for commit. >>>> >>>> - Marcin >>>> >>> >>> Yes, I forgot to mention that it's for CXXOperatorCallExpr, will add this >> in comment. It probably should have its own code path, but the new >> FstArgAsLValue argument of EvalArguments will be usable for it, so this >> change can be treated as the first step in proper handling of >> CXXOperatorCallExpr. > > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
