summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-05-13 17:56:46 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-05-13 17:56:46 +0000
commitf428fcfaa010a684cf85ced2917bacdfebdbaac9 (patch)
tree08cd61a58e07ed7042f5f5ee44d85cf8d69ebeaa
parentd11c92a41cdb3e5addf229c8bffb16684e096b70 (diff)
downloadbcm5719-llvm-f428fcfaa010a684cf85ced2917bacdfebdbaac9.tar.gz
bcm5719-llvm-f428fcfaa010a684cf85ced2917bacdfebdbaac9.zip
Silence Visual C++ warning C4189: 'Result' : local variable is initialized but not referenced.
Sadly, LLVM_ATTRIBUTE_UNUSED does nothing with Visual C++ which means we'll have to workaround such cases again and again. llvm-svn: 237267
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index af8d309267c..6f676ad7c55 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -3656,8 +3656,10 @@ SpecializeCorrespondingLambdaCallOperatorAndInvoker(
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!");
OpenPOWER on IntegriCloud