Skip to content

Commit a9e526e

Browse files
committed
Fix formatting.
1 parent 1524ca5 commit a9e526e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class UncountedLambdaCapturesChecker
6262
return true;
6363
}
6464

65-
// WTF::switchOn(T, F... f) is a variadic template function and couldn't be annotated with NOESCAPE.
66-
// We hard code it here to workaround that.
65+
// WTF::switchOn(T, F... f) is a variadic template function and couldn't
66+
// be annotated with NOESCAPE. We hard code it here to workaround that.
6767
bool shouldTreatAllArgAsNoEscape(FunctionDecl *Decl) {
6868
auto *NsDecl = Decl->getParent();
6969
if (!NsDecl || !isa<NamespaceDecl>(NsDecl))
@@ -82,7 +82,8 @@ class UncountedLambdaCapturesChecker
8282
auto *Init = VD->getInit()->IgnoreParenCasts();
8383
if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) {
8484
DeclRefExprsToIgnore.insert(DRE);
85-
Checker->visitLambdaExpr(L, /* ignoreParamVarDecl */ true);
85+
Checker->visitLambdaExpr(L,
86+
/* ignoreParamVarDecl */ true);
8687
}
8788
}
8889
}
@@ -98,7 +99,7 @@ class UncountedLambdaCapturesChecker
9899
break;
99100
auto *Arg = CE->getArg(ArgIndex)->IgnoreParenCasts();
100101
if (!Param->hasAttr<NoEscapeAttr>() && !TreatAllArgsAsNoEscape) {
101-
if (auto *L = dyn_cast_or_null<LambdaExpr>(Arg->IgnoreParenCasts()))
102+
if (auto *L = dyn_cast_or_null<LambdaExpr>(Arg))
102103
Checker->visitLambdaExpr(L);
103104
}
104105
++ArgIndex;
@@ -171,7 +172,8 @@ class UncountedLambdaCapturesChecker
171172
Os << "Implicitly captured ";
172173
}
173174

174-
Os << "raw-pointer 'this' to ref-counted / CheckedPtr capable type is unsafe.";
175+
Os << "raw-pointer 'this' to ref-counted / CheckedPtr capable type is "
176+
"unsafe.";
175177

176178
PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager());
177179
auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);

0 commit comments

Comments
 (0)