[clang] 97c87c6 - [AST] Fix an unused variable warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 19 00:21:05 PDT 2022
Author: Kazu Hirata
Date: 2022-06-19T00:20:58-07:00
New Revision: 97c87c6f7cff16c582844e6308df03f9ab7c31b7
URL: https://github.com/llvm/llvm-project/commit/97c87c6f7cff16c582844e6308df03f9ab7c31b7
DIFF: https://github.com/llvm/llvm-project/commit/97c87c6f7cff16c582844e6308df03f9ab7c31b7.diff
LOG: [AST] Fix an unused variable warning
This paptch fixes:
warning: unused variable ‘DD’ [-Wunused-variable]
Added:
Modified:
clang/lib/AST/DeclCXX.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index d2be99745b91..6fc9a86bc3cf 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -827,7 +827,7 @@ void CXXRecordDecl::addedMember(Decl *D) {
// Handle member functions.
if (const auto *Method = dyn_cast<CXXMethodDecl>(D)) {
- if (const auto *DD = dyn_cast<CXXDestructorDecl>(D))
+ if (isa<CXXDestructorDecl>(D))
SMKind |= SMF_Destructor;
if (Method->isCopyAssignmentOperator()) {
More information about the cfe-commits
mailing list