ilya-biryukov added a comment. Should we follow suggestion from CWG Issue 2602 <https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2602> to fix this instead? I think the trick is to keep the constructor consteval, but complain when processing its call, e.g. somewhere around `HandleConstructorCall` in `ExprConstant.cpp`?
================ Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7207 + Sema::InheritedConstructorInfo *Inherited = nullptr, + CXXMethodDecl *SpecialMemberDecl = nullptr) { if (!S.getLangOpts().CPlusPlus11) ---------------- The function attempts to check whether the `implicitly` defined member would be `constexpr`, which should not depend on what is written in the expliclitly defaulted declaration. So the check should definitely be performed somewhere outside this function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits