r361145 - Fix compilation warning about unused variable [NFC]
Mikael Holmen via cfe-commits
cfe-commits at lists.llvm.org
Mon May 20 04:38:33 PDT 2019
Author: uabelho
Date: Mon May 20 04:38:33 2019
New Revision: 361145
URL: http://llvm.org/viewvc/llvm-project?rev=361145&view=rev
Log:
Fix compilation warning about unused variable [NFC]
Without the fix at least clang 3.6 complains with
../tools/clang/lib/AST/ExprConstant.cpp:90:24: error: unused variable 'TI' [-Werror,-Wunused-variable]
if (TypeInfoLValue TI = B.dyn_cast<TypeInfoLValue>())
^
1 error generated.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=361145&r1=361144&r2=361145&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Mon May 20 04:38:33 2019
@@ -87,7 +87,7 @@ namespace {
return D->getType();
}
- if (TypeInfoLValue TI = B.dyn_cast<TypeInfoLValue>())
+ if (B.is<TypeInfoLValue>())
return B.getTypeInfoType();
const Expr *Base = B.get<const Expr*>();
More information about the cfe-commits
mailing list