[clang] [Clang][Sema] Check the number of lambda non-concept tempate parameters (PR #74885)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 10 19:36:10 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 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873 a14cfc5f15fcddd4b89155c4f3f58a21c27140c4 -- clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/TreeTransform.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaConcept.cpp b/clang/lib/Sema/SemaConcept.cpp
index f8556b5d9a..18f038025d 100644
--- a/clang/lib/Sema/SemaConcept.cpp
+++ b/clang/lib/Sema/SemaConcept.cpp
@@ -932,7 +932,7 @@ bool Sema::CheckInstantiatedFunctionTemplateConstraints(
// // }
// }
-
+
// Check the number of the Concept template parameters
// for (auto P : TemplateAC) {
// // const TemplateTypeParmDecl *CD = dyn_cast<TemplateTypeParmDecl>(P);
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index 10e93f8555..7c3702e006 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -3614,10 +3614,10 @@ Sema::TemplateDeductionResult Sema::FinishTemplateArgumentDeduction(
SFINAETrap Trap(*this);
auto *Method = dyn_cast<CXXMethodDecl>(FunctionTemplate);
- for(auto arg: Deduced) {
+ for (auto arg : Deduced) {
auto ty = arg.getAsType();
- if ( ty->isBuiltinType() ) {
- return TDK_SubstitutionFailure;
+ if (ty->isBuiltinType()) {
+ return TDK_SubstitutionFailure;
}
}
// Enter a new template instantiation context while we instantiate the
``````````
</details>
https://github.com/llvm/llvm-project/pull/74885
More information about the cfe-commits
mailing list