[clang] [webkit.UncountedLambdaCapturesChecker] Treat every argument of std::ranges functions as noescape. (PR #138995)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 7 16:59:38 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp
index d3b8d8b69..c322f377d 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLambdaCapturesChecker.cpp
@@ -137,8 +137,9 @@ public:
return true;
// Treat every argument of functions in std::ranges as noescape.
if (safeGetName(NsDecl) == "ranges") {
- if (auto *OuterDecl = NsDecl->getParent(); OuterDecl &&
- isa<NamespaceDecl>(OuterDecl) && safeGetName(OuterDecl) == "std")
+ if (auto *OuterDecl = NsDecl->getParent();
+ OuterDecl && isa<NamespaceDecl>(OuterDecl) &&
+ safeGetName(OuterDecl) == "std")
return true;
}
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/138995
More information about the cfe-commits
mailing list