Skip to content

Commit af15db0

Browse files
committed
[NFC][[webkit.UncountedLambdaCapturesChecker] Remove unnecessary check
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 3ad2399 commit af15db0

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)