[PATCH] D91519: [AST][Mach0] Fix unused-variable warnings

Gabriel Hjort Ã…kerlund via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 17 23:21:36 PST 2020


ehjogab updated this revision to Diff 305984.
ehjogab added a comment.

Replace dyn_cast with isa


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91519/new/

https://reviews.llvm.org/D91519

Files:
  clang/lib/AST/APValue.cpp
  lld/MachO/SymbolTable.cpp


Index: lld/MachO/SymbolTable.cpp
===================================================================
--- lld/MachO/SymbolTable.cpp
+++ lld/MachO/SymbolTable.cpp
@@ -134,7 +134,7 @@
     // FIXME: Make every symbol (including absolute symbols) contain a
     // reference to their originating file, then add that file name to this
     // error message.
-    if (auto *defined = dyn_cast<Defined>(s))
+    if (isa<Defined>(s))
       error("found defined symbol with illegal name " + DSOHandle::name);
   }
   replaceSymbol<DSOHandle>(s, header);
Index: clang/lib/AST/APValue.cpp
===================================================================
--- clang/lib/AST/APValue.cpp
+++ clang/lib/AST/APValue.cpp
@@ -1062,7 +1062,7 @@
   }
 
   case APValue::Union:
-    if (const auto *FD = V.getUnionField())
+    if (V.getUnionField())
       Merge(V.getUnionValue());
     break;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91519.305984.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201118/534f9588/attachment.bin>


More information about the cfe-commits mailing list