Skip to content

Commit e5a6f1c

Browse files
authored
[NFC][webkit.UncountedLambdaCapturesChecker] Remove unnecessary check (#120069)
CXXMD is checked for null, but it can't be null inside of a visitor's method. Found by a static analyzer tool.
1 parent 9c89b40 commit e5a6f1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class UncountedLambdaCapturesChecker
5252

5353
bool TraverseCXXMethodDecl(CXXMethodDecl *CXXMD) override {
5454
llvm::SaveAndRestore SavedDecl(ClsType);
55-
if (CXXMD && CXXMD->isInstance())
55+
if (CXXMD->isInstance())
5656
ClsType = CXXMD->getThisType();
5757
return DynamicRecursiveASTVisitor::TraverseCXXMethodDecl(CXXMD);
5858
}

0 commit comments

Comments
 (0)