From: Mikael Holmen Date: Mon, 20 May 2019 11:38:33 +0000 (+0000) Subject: Fix compilation warning about unused variable [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2547712fac2b01170de83c61ada593203eb6c29a;p=clang 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()) ^ 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361145 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 856efc8294..e654480f09 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -87,7 +87,7 @@ namespace { return D->getType(); } - if (TypeInfoLValue TI = B.dyn_cast()) + if (B.is()) return B.getTypeInfoType(); const Expr *Base = B.get();