[clang] [WebKit Checkers] Trace through temporaries in tryToFindPtrOrigin (PR #224877)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 19 19:29:14 PDT 2026
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 origin/main HEAD --extensions cpp,h -- clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.h clang/lib/StaticAnalyzer/Checkers/WebKit/RawPtrRefLocalVarsChecker.cpp clang/test/Analysis/Checkers/WebKit/uncounted-local-vars.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
index 2d9c88de1..28e83fecc 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp
@@ -83,9 +83,10 @@ bool tryToFindPtrOrigin(
if (auto *Expr = dyn_cast<ConditionalOperator>(E)) {
const bool ShortLivedOnEntry =
CrossedShortLivedTemporary && *CrossedShortLivedTemporary;
- bool TrueResult = tryToFindPtrOrigin(
- Expr->getTrueExpr(), StopAtFirstRefCountedObj, isSafePtr,
- isSafePtrType, isSafeGlobalDecl, callback, CrossedShortLivedTemporary);
+ bool TrueResult =
+ tryToFindPtrOrigin(Expr->getTrueExpr(), StopAtFirstRefCountedObj,
+ isSafePtr, isSafePtrType, isSafeGlobalDecl,
+ callback, CrossedShortLivedTemporary);
if (CrossedShortLivedTemporary)
*CrossedShortLivedTemporary = ShortLivedOnEntry;
return TrueResult &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/224877
More information about the cfe-commits
mailing list