aaron.ballman requested changes to this revision.
aaron.ballman added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7808-7809
+    if (!MD->isConsteval()) {
+      Diag(MD->getBeginLoc(), diag::note_incorrect_defaulted_constexpr)
+          << RD << MD;
+    }
----------------
I'm not certain I understand how this note helps users -- the note is always 
attached to the instance method being defaulted, so it will always appear where 
the class context is obvious. e.g.,
```
struct S {
  constexpr S() = default; // Can quickly tell we're in class S
  constexpr S(const S&);
};

constexpr S::S(const S&) = default; // Can still quickly tell we're in class S
```
Do you have some code examples where this note helps clarify in ways I'm not 
seeing from the test coverage?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158540/new/

https://reviews.llvm.org/D158540

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to