[PATCH] D135558: [Clang][NFC]Use isa instead of dyn_cast in shouldAddReversedEqEq

Liao Chunyu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 9 23:52:04 PDT 2022


liaolucy created this revision.
liaolucy added a reviewer: usaxena95.
Herald added a project: All.
liaolucy requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fix warning: unused variable ‘MD’


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135558

Files:
  clang/lib/Sema/SemaOverload.cpp


Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -931,7 +931,7 @@
   // target.
   DeclarationName NotEqOp = S.Context.DeclarationNames.getCXXOperatorName(
       OverloadedOperatorKind::OO_ExclaimEqual);
-  if (auto *MD = dyn_cast<CXXMethodDecl>(EqFD)) {
+  if (isa<CXXMethodDecl>(EqFD)) {
     // If F is a class member, search scope is class type of first operand.
     QualType RHS = FirstOperand->getType();
     auto *RHSRec = RHS->getAs<RecordType>();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135558.466435.patch
Type: text/x-patch
Size: 592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221010/02c91ac4/attachment.bin>


More information about the cfe-commits mailing list