[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 18 03:45:49 PDT 2024
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 d990cc4568f45c28d1d5ac86125935628c76efc8 cebe7063174a12dfedbe28185b7173b8826093ab --extensions cpp,h -- clang/include/clang/Sema/Sema.h clang/include/clang/Sema/Template.h clang/lib/Sema/SemaConcept.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/SemaTemplateDeductionGuide.cpp clang/lib/Sema/SemaTemplateInstantiate.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/TreeTransform.h clang/test/CXX/drs/cwg23xx.cpp clang/test/CXX/drs/cwg26xx.cpp clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp clang/test/CXX/temp/temp.constr/temp.constr.atomic/constrant-satisfaction-conversions.cpp clang/test/SemaCXX/concept-crash-on-diagnostic.cpp clang/test/SemaCXX/cxx20-ctad-type-alias.cpp clang/test/SemaCXX/cxx23-assume.cpp clang/test/SemaCXX/cxx2c-fold-exprs.cpp clang/test/SemaCXX/lambda-unevaluated.cpp clang/test/SemaTemplate/concepts-recursive-inst.cpp clang/test/SemaTemplate/cxx2a-constraint-exprs.cpp clang/test/SemaTemplate/deduction-guide.cpp clang/test/SemaTemplate/nested-implicit-deduction-guides.cpp libcxx/include/__chrono/leap_second.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 99c1b4a699..f89dd6878b 100644
--- a/clang/lib/Sema/SemaConcept.cpp
+++ b/clang/lib/Sema/SemaConcept.cpp
@@ -1168,7 +1168,6 @@ bool Sema::CheckFunctionConstraintsWithoutInstantiation(
/*Pattern=*/nullptr,
/*ForConstraintInstantiation=*/true);
-
Qualifiers ThisQuals;
CXXRecordDecl *Record = nullptr;
if (auto *Method = dyn_cast<CXXMethodDecl>(FD)) {
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index 4f590fc1af..971dc65eb1 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1351,6 +1351,7 @@ namespace {
DeclContext *FunctionDCForParameterDeclInstantiation;
LocalInstantiationScope *ParameterInstantiationScope;
+
private:
bool instantiateParameterToScope(ParmVarDecl *OldParm,
LocalInstantiationScope &Scope);
@@ -1367,9 +1368,7 @@ namespace {
void setEvaluateConstraints(bool B) {
EvaluateConstraints = B;
}
- bool getEvaluateConstraints() const {
- return EvaluateConstraints;
- }
+ bool getEvaluateConstraints() const { return EvaluateConstraints; }
void setInstantiatingFunctionDC(DeclContext *FunctionDC) {
FunctionDCForParameterDeclInstantiation = FunctionDC;
@@ -4441,7 +4440,6 @@ static const Decl *getCanonicalParmVarDecl(const Decl *D) {
return D;
}
-
llvm::PointerUnion<Decl *, LocalInstantiationScope::DeclArgumentPack *> *
LocalInstantiationScope::findInstantiationUnsafe(const Decl *D) {
D = getCanonicalParmVarDecl(D);
``````````
</details>
https://github.com/llvm/llvm-project/pull/102857
More information about the cfe-commits
mailing list