r346950 - Fix warning about unused variable [NFC]

Mikael Holmen via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 15 05:01:54 PST 2018


Author: uabelho
Date: Thu Nov 15 05:01:54 2018
New Revision: 346950

URL: http://llvm.org/viewvc/llvm-project?rev=346950&view=rev
Log:
Fix warning about unused variable [NFC]

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=346950&r1=346949&r2=346950&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Thu Nov 15 05:01:54 2018
@@ -976,9 +976,9 @@ static Address createUnnamedGlobalFrom(C
       return CGM.getMangledName(FD);
     } else if (const auto *OM = dyn_cast<ObjCMethodDecl>(DC)) {
       return OM->getNameAsString();
-    } else if (const auto *OM = dyn_cast<BlockDecl>(DC)) {
+    } else if (isa<BlockDecl>(DC)) {
       return "<block>";
-    } else if (const auto *OM = dyn_cast<CapturedDecl>(DC)) {
+    } else if (isa<CapturedDecl>(DC)) {
       return "<captured>";
     } else {
       llvm::llvm_unreachable_internal("expected a function or method");




More information about the cfe-commits mailing list