r337796 - Fix unused variable warnings; NFC
George Burgess IV via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 23 19:10:53 PDT 2018
Author: gbiv
Date: Mon Jul 23 19:10:53 2018
New Revision: 337796
URL: http://llvm.org/viewvc/llvm-project?rev=337796&view=rev
Log:
Fix unused variable warnings; NFC
Looks like MTE was previously used for its SourceLoc, but we're now
using a seperate SourceLocation here.
Modified:
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=337796&r1=337795&r2=337796&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Jul 23 19:10:53 2018
@@ -6774,7 +6774,7 @@ void Sema::checkInitializerLifetime(cons
}
case LK_MemInitializer: {
- if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(L)) {
+ if (isa<MaterializeTemporaryExpr>(L)) {
// Under C++ DR1696, if a mem-initializer (or a default member
// initializer used by the absence of one) would lifetime-extend a
// temporary, the program is ill-formed.
@@ -6833,7 +6833,7 @@ void Sema::checkInitializerLifetime(cons
}
case LK_New:
- if (auto *MTE = dyn_cast<MaterializeTemporaryExpr>(L)) {
+ if (isa<MaterializeTemporaryExpr>(L)) {
Diag(DiagLoc, RK == RK_ReferenceBinding
? diag::warn_new_dangling_reference
: diag::warn_new_dangling_initializer_list)
More information about the cfe-commits
mailing list