]> granicus.if.org Git - clang/commitdiff
Change dyn_casts with unused variables to isa statements to avoid unused variables.
authorEric Christopher <echristo@gmail.com>
Fri, 14 Jul 2017 01:42:57 +0000 (01:42 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 14 Jul 2017 01:42:57 +0000 (01:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307988 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmtOpenMP.cpp
lib/Sema/SemaDeclObjC.cpp

index 50240d45717bdd5d6f8b0b37cd2aabde0729f404..8da6fcdfbea0012618d55a77f1d5b00528b748d0 100644 (file)
@@ -956,7 +956,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit(
 
     auto *LHSVD = cast<VarDecl>(cast<DeclRefExpr>(*ILHS)->getDecl());
     auto *RHSVD = cast<VarDecl>(cast<DeclRefExpr>(*IRHS)->getDecl());
-    if (auto *OASE = dyn_cast<OMPArraySectionExpr>(IRef)) {
+    if (isa<OMPArraySectionExpr>(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<ArraySubscriptExpr>(IRef)) {
+    } else if (isa<ArraySubscriptExpr>(IRef)) {
       // Store the address of the original variable associated with the LHS
       // implicit variable.
       PrivateScope.addPrivate(LHSVD, [&RedCG, Count]() -> Address {
index 302f24880f6cc125f5ef1adc03671ca03769ac16..967573011d0dce80940d3a857d97e761c6273be6 100644 (file)
@@ -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<ObjCMethodDecl>(ND)) {
+    if (isa<ObjCMethodDecl>(ND)) {
       if (Availability != AR_Unavailable)
         return;
       // Warn about implementing unavailable methods.