We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db17a4c commit 7dcf216Copy full SHA for 7dcf216
clang-tools-extra/clang-tidy/bugprone/DefaultLambdaCaptureCheck.cpp
@@ -27,11 +27,7 @@ void DefaultLambdaCaptureCheck::registerMatchers(MatchFinder *Finder) {
27
28
void DefaultLambdaCaptureCheck::check(const MatchFinder::MatchResult &Result) {
29
const auto *Lambda = Result.Nodes.getNodeAs<LambdaExpr>("lambda");
30
- if (!Lambda)
31
- return;
32
-
33
- // No need to check getCaptureDefault() != LCD_None since our custom matcher
34
- // hasDefaultCapture() already ensures this condition
+ assert(Lambda);
35
36
SourceLocation DefaultCaptureLoc = Lambda->getCaptureDefaultLoc();
37
if (DefaultCaptureLoc.isInvalid())
0 commit comments