[clang] Revert "[Clang][C++23] Implement P2448R2 ..." (PR #85136)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 14:48:10 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 ccfb9e6eb7429885e6d09e99cf89bce41f1ca3cc 2f67dfb012038678dd0b873394a55bd5c937f843 -- clang/lib/AST/DeclCXX.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/test/AST/Interp/cxx23.cpp clang/test/CXX/class/class.compare/class.compare.default/p3.cpp clang/test/CXX/class/class.compare/class.compare.default/p4.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp clang/test/CXX/drs/dr13xx.cpp clang/test/CXX/drs/dr14xx.cpp clang/test/CXX/drs/dr15xx.cpp clang/test/CXX/drs/dr16xx.cpp clang/test/CXX/drs/dr6xx.cpp clang/test/CXX/expr/expr.const/p5-26.cpp clang/test/CXX/special/class.copy/p13-0x.cpp clang/test/SemaCXX/constant-expression-cxx11.cpp clang/test/SemaCXX/constant-expression-cxx14.cpp clang/test/SemaCXX/constant-expression-cxx2b.cpp clang/test/SemaCXX/cxx2a-consteval.cpp clang/test/SemaCXX/deduced-return-type-cxx14.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 199f2523cf..b14699894b 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -1743,8 +1743,7 @@ static bool CheckConstexprDestructorSubobjects(Sema &SemaRef,
/// Check whether a function's parameter types are all literal types. If so,
/// return true. If not, produce a suitable diagnostic and return false.
-static bool CheckConstexprParameterTypes(Sema &SemaRef,
- const FunctionDecl *FD,
+static bool CheckConstexprParameterTypes(Sema &SemaRef, const FunctionDecl *FD,
Sema::CheckConstexprKind Kind) {
unsigned ArgIndex = 0;
const auto *FT = FD->getType()->castAs<FunctionProtoType>();
@@ -7858,7 +7857,8 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
MD->isConstexpr() && !Constexpr &&
MD->getTemplatedKind() == FunctionDecl::TK_NonTemplate) {
if (!MD->isConsteval() && RD->getNumVBases()) {
- Diag(MD->getBeginLoc(), diag::err_incorrect_defaulted_constexpr_with_vb)
+ Diag(MD->getBeginLoc(),
+ diag::err_incorrect_defaulted_constexpr_with_vb)
<< CSM;
for (const auto &I : RD->vbases())
Diag(I.getBeginLoc(), diag::note_constexpr_virtual_base_here);
@@ -7868,8 +7868,8 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
: diag::err_incorrect_defaulted_constexpr)
<< CSM;
}
- // FIXME: Explain why the special member can't be constexpr.
- HadError = true;
+ // FIXME: Explain why the special member can't be constexpr.
+ HadError = true;
}
if (First) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/85136
More information about the cfe-commits
mailing list