From: Eric Christopher Date: Fri, 14 Jul 2017 01:42:57 +0000 (+0000) Subject: Change dyn_casts with unused variables to isa statements to avoid unused variables. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=549561b9ed697326f27d4d0c0d8658cbd794582e;p=clang Change dyn_casts with unused variables to isa statements to avoid unused variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307988 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGStmtOpenMP.cpp b/lib/CodeGen/CGStmtOpenMP.cpp index 50240d4571..8da6fcdfbe 100644 --- a/lib/CodeGen/CGStmtOpenMP.cpp +++ b/lib/CodeGen/CGStmtOpenMP.cpp @@ -956,7 +956,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit( auto *LHSVD = cast(cast(*ILHS)->getDecl()); auto *RHSVD = cast(cast(*IRHS)->getDecl()); - if (auto *OASE = dyn_cast(IRef)) { + if (isa(IRef)) { // Store the address of the original variable associated with the LHS // implicit variable. PrivateScope.addPrivate(LHSVD, [&RedCG, Count]() -> Address { @@ -965,7 +965,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit( PrivateScope.addPrivate(RHSVD, [this, PrivateVD]() -> Address { return GetAddrOfLocalVar(PrivateVD); }); - } else if (auto *ASE = dyn_cast(IRef)) { + } else if (isa(IRef)) { // Store the address of the original variable associated with the LHS // implicit variable. PrivateScope.addPrivate(LHSVD, [&RedCG, Count]() -> Address { diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 302f24880f..967573011d 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -255,7 +255,7 @@ static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND, bool IsCategory = false; AvailabilityResult Availability = ND->getAvailability(); if (Availability != AR_Deprecated) { - if (const auto *MD = dyn_cast(ND)) { + if (isa(ND)) { if (Availability != AR_Unavailable) return; // Warn about implementing unavailable methods.