diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2015-05-13 17:56:46 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2015-05-13 17:56:46 +0000 |
commit | f428fcfaa010a684cf85ced2917bacdfebdbaac9 (patch) | |
tree | 08cd61a58e07ed7042f5f5ee44d85cf8d69ebeaa /clang/lib | |
parent | d11c92a41cdb3e5addf229c8bffb16684e096b70 (diff) | |
download | bcm5719-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
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 6 |
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!"); |