[clang] [C++20] [Modules] Correct Module Ownership and use canonical decl (PR #246565)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 26 23:02:59 PST 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 cppm,cpp -- clang/test/Modules/pr245967.cppm clang/lib/Sema/SemaTemplateDeductionGuide.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/Sema/SemaTemplateDeductionGuide.cpp b/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
index c50d7b284..be5bc8e9a 100644
--- a/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+++ b/clang/lib/Sema/SemaTemplateDeductionGuide.cpp
@@ -1553,9 +1553,8 @@ void DeclareImplicitDeductionGuidesForTypeAlias(
continue;
}
FunctionTemplateDecl *F = dyn_cast<FunctionTemplateDecl>(G);
- if (!F ||
- SourceDeductionGuides.contains(
- F->getTemplatedDecl()->getCanonicalDecl()))
+ if (!F || SourceDeductionGuides.contains(
+ F->getTemplatedDecl()->getCanonicalDecl()))
continue;
// The **aggregate** deduction guides are handled in a different code path
// (DeclareAggregateDeductionGuideFromInitList), which involves the tricky
``````````
</details>
https://github.com/llvm/llvm-project/pull/246565
More information about the cfe-commits
mailing list