Skip to content

Commit

Permalink
[NFC][webkit.UncountedLambdaCapturesChecker] Remove unnecessary check (
Browse files Browse the repository at this point in the history
…llvm#120069)

CXXMD is checked for null, but it can't be null inside of a visitor's
method. Found by a static analyzer tool.
  • Loading branch information
Fznamznon authored Dec 17, 2024
1 parent 9c89b40 commit e5a6f1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class UncountedLambdaCapturesChecker

bool TraverseCXXMethodDecl(CXXMethodDecl *CXXMD) override {
llvm::SaveAndRestore SavedDecl(ClsType);
if (CXXMD && CXXMD->isInstance())
if (CXXMD->isInstance())
ClsType = CXXMD->getThisType();
return DynamicRecursiveASTVisitor::TraverseCXXMethodDecl(CXXMD);
}
Expand Down

0 comments on commit e5a6f1c

Please sign in to comment.