Committed revision 237267, thanks!
2015-05-13 19:54 GMT+03:00 Aaron Ballman <[email protected]>: > On Wed, May 13, 2015 at 12:42 PM, Yaron Keren <[email protected]> > wrote: > > Hi Aaron, > > > > What do you think about fixing: > > > > tools\clang\lib\Sema\SemaTemplateDeduction.cpp(3660): warning C4189: > > 'Result' : local variable is initialize d but not referenced > > > > with > > > > Index: tools/clang/lib/Sema/SemaTemplateDeduction.cpp > > =================================================================== > > --- tools/clang/lib/Sema/SemaTemplateDeduction.cpp (revision 237261) > > +++ tools/clang/lib/Sema/SemaTemplateDeduction.cpp (working copy) > > @@ -3656,8 +3656,10 @@ > > FunctionTemplateDecl *InvokerTemplate = LambdaClass-> > > > getLambdaStaticInvoker()->getDescribedFunctionTemplate(); > > > > - Sema::TemplateDeductionResult LLVM_ATTRIBUTE_UNUSED Result > > - = S.FinishTemplateArgumentDeduction(InvokerTemplate, > DeducedArguments, > > 0, > > +#ifndef NDEBUG > > + Sema::TemplateDeductionResult LLVM_ATTRIBUTE_UNUSED Result = > > +#endif > > + S.FinishTemplateArgumentDeduction(InvokerTemplate, > DeducedArguments, 0, > > InvokerSpecialized, TDInfo); > > assert(Result == Sema::TDK_Success && > > "If the call operator succeeded so should the invoker!"); > > > > > > The problem is LLVM_ATTRIBUTE_UNUSED does not work with Visual C++. > > Yoiks. That's likely the best way to solve it, short of disabling the > warning entirely (which I'd still be opposed to, but less so having > seen this code). > > ~Aaron >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
