[clang] 7cee288 - Fix `-Wunused-variable` warning. NFC.

Michael Liao via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 21 08:11:43 PST 2019


Author: Michael Liao
Date: 2019-12-21T11:10:35-05:00
New Revision: 7cee28858674d233903e92b7a0c49b07b05ed3d3

URL: https://github.com/llvm/llvm-project/commit/7cee28858674d233903e92b7a0c49b07b05ed3d3
DIFF: https://github.com/llvm/llvm-project/commit/7cee28858674d233903e92b7a0c49b07b05ed3d3.diff

LOG: Fix `-Wunused-variable` warning. NFC.

Added: 
    

Modified: 
    clang/lib/Sema/SemaDeclObjC.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 4fdddfbb7a7e..5fdf6aeed5b4 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -4776,7 +4776,7 @@ Decl *Sema::ActOnMethodDeclaration(
             if (auto *Cat = dyn_cast<ObjCCategoryDecl>(IMD->getDeclContext()))
               decl = Cat->IsClassExtension() ? 1 : 2;
 
-            if (auto *Cat = dyn_cast<ObjCCategoryImplDecl>(ImpDecl))
+            if (isa<ObjCCategoryImplDecl>(ImpDecl))
               impl = 1 + (decl != 0);
 
             Diag(ObjCMethod->getLocation(),


        


More information about the cfe-commits mailing list