[clang] 4b369ff - [analyzer][NFC] Fix unused variable warning
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 20 04:44:06 PDT 2024
Author: Fraser Cormack
Date: 2024-03-20T11:43:38Z
New Revision: 4b369ff076d9205ddbcfcdef89276a737a83ce0e
URL: https://github.com/llvm/llvm-project/commit/4b369ff076d9205ddbcfcdef89276a737a83ce0e
DIFF: https://github.com/llvm/llvm-project/commit/4b369ff076d9205ddbcfcdef89276a737a83ce0e.diff
LOG: [analyzer][NFC] Fix unused variable warning
Added:
Modified:
clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
Removed:
################################################################################
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
index 1a9d6d3127fb7f..b36fa95bc73f3e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
@@ -43,8 +43,7 @@ tryToFindPtrOrigin(const Expr *E, bool StopAtFirstRefCountedObj) {
if (auto *call = dyn_cast<CallExpr>(E)) {
if (auto *memberCall = dyn_cast<CXXMemberCallExpr>(call)) {
if (auto *decl = memberCall->getMethodDecl()) {
- std::optional<bool> IsGetterOfRefCt =
- isGetterOfRefCounted(memberCall->getMethodDecl());
+ std::optional<bool> IsGetterOfRefCt = isGetterOfRefCounted(decl);
if (IsGetterOfRefCt && *IsGetterOfRefCt) {
E = memberCall->getImplicitObjectArgument();
if (StopAtFirstRefCountedObj) {
More information about the cfe-commits
mailing list