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 --
clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/SemaTemplate/alias-template-deprecated.cpp
clang/test/SemaTemplate/alias-templates.cpp
``````````
: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/SemaTemplateInstantiate.cpp
b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index e0f65685d..7b05e4cf1 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1271,10 +1271,10 @@ void
Sema::PrintInstantiationStack(InstantiationContextDiagFuncRef DiagFunc) {
PDiag(diag::note_building_deduction_guide_here));
break;
case CodeSynthesisContext::TypeAliasTemplateInstantiation:
- // Workaround for a workaround: don't produce a note if we are merely
instantiating
- // some other template which contains this alias template.
- // This would be redundant either with the error itself, or some other
context note
- // attached to it.
+ // Workaround for a workaround: don't produce a note if we are merely
+ // instantiating some other template which contains this alias template.
+ // This would be redundant either with the error itself, or some other
+ // context note attached to it.
if (Active->NumTemplateArgs == 0)
break;
DiagFunc(Active->PointOfInstantiation,
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 0fd34ee1d..3819f7758 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1580,13 +1580,13 @@ Decl
*TemplateDeclInstantiator::InstantiateTypeAliasTemplateDecl(
if (!InstParams)
return nullptr;
- // FIXME: This is a hack for instantiating lambdas in the pattern of the
alias.
- // We are not really instantiating the alias at its template level, that
only happens
- // in CheckTemplateId, this is only for outer templates which contain it.
- // In getTemplateInstantiationArgs, the template arguments used here would be
- // used for collating the template arguments needed to instantiate the
lambda.
- // Pass an empty argument list, so this workaround doesn't get confused if
- // there is an outer alias being instantiated.
+ // FIXME: This is a hack for instantiating lambdas in the pattern of the
+ // alias. We are not really instantiating the alias at its template level,
+ // that only happens in CheckTemplateId, this is only for outer templates
+ // which contain it. In getTemplateInstantiationArgs, the template arguments
+ // used here would be used for collating the template arguments needed to
+ // instantiate the lambda. Pass an empty argument list, so this workaround
+ // doesn't get confused if there is an outer alias being instantiated.
Sema::InstantiatingTemplate InstTemplate(SemaRef, D->getBeginLoc(), D,
ArrayRef<TemplateArgument>());
if (InstTemplate.isInvalid())
``````````
</details>
https://github.com/llvm/llvm-project/pull/161986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits