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++.
Yaron
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits