[clang] [alpha.webkit.ForwardDeclChecker] Recognize a forward declared template specialization (PR #134545)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 6 09:33:35 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/ForwardDeclChecker.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
index 4f63e5ed8..73a0e9eda 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/ForwardDeclChecker.cpp
@@ -129,7 +129,7 @@ public:
return false;
// Find a definition amongst template declarations.
if (auto *Specialization = dyn_cast<ClassTemplateSpecializationDecl>(R)) {
- if (auto* S = Specialization->getSpecializedTemplate()) {
+ if (auto *S = Specialization->getSpecializedTemplate()) {
for (S = S->getMostRecentDecl(); S; S = S->getPreviousDecl()) {
if (S->isThisDeclarationADefinition())
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/134545
More information about the cfe-commits
mailing list