[clang] [clang] Fix CTAD not respect default template arguments that were added after the definition. (PR #75569)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 00:19:58 PST 2023
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 f1ea77f7be8acda2aa4b08ba27f454512a872057 0f49d91b4a22944216cff8654f9c00f892bb02be -- clang/lib/Sema/SemaTemplate.cpp clang/test/SemaTemplate/ctad.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 450a1a1db0..5fcc39ec70 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2070,13 +2070,13 @@ DeclResult Sema::CheckClassTemplate(
if (!(TUK == TUK_Friend && CurContext->isDependentContext()) &&
CheckTemplateParameterList(
TemplateParams,
- PrevClassTemplate
- ? GetTemplateParameterList(PrevClassTemplate)
- : nullptr,
+ PrevClassTemplate ? GetTemplateParameterList(PrevClassTemplate)
+ : nullptr,
(SS.isSet() && SemanticContext && SemanticContext->isRecord() &&
SemanticContext->isDependentContext())
? TPC_ClassTemplateMember
- : TUK == TUK_Friend ? TPC_FriendClassTemplate : TPC_ClassTemplate,
+ : TUK == TUK_Friend ? TPC_FriendClassTemplate
+ : TPC_ClassTemplate,
SkipBody))
Invalid = true;
``````````
</details>
https://github.com/llvm/llvm-project/pull/75569
More information about the cfe-commits
mailing list