From: George Burgess IV Date: Tue, 24 Jul 2018 02:10:53 +0000 (+0000) Subject: Fix unused variable warnings; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69bd8cea125aa6e49a6a57f89456fd5105bf95fb;p=clang Fix unused variable warnings; NFC Looks like MTE was previously used for its SourceLoc, but we're now using a seperate SourceLocation here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337796 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 76044ee521..9b5a918b71 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -6774,7 +6774,7 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, } case LK_MemInitializer: { - if (auto *MTE = dyn_cast(L)) { + if (isa(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(const InitializedEntity &Entity, } case LK_New: - if (auto *MTE = dyn_cast(L)) { + if (isa(L)) { Diag(DiagLoc, RK == RK_ReferenceBinding ? diag::warn_new_dangling_reference : diag::warn_new_dangling_initializer_list)