If the compiler is choosing pointer members using a best-case scheme,
diagnose when we select the unspecified representation. It is unlikely
that this is what the user intended.
Details
Diff Detail
Event Timeline
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
2514–2515 | Maybe this should also mention that (a) this happened because the class type was incomplete at the point where the inheritance model was first required, and (b) a different inheritance model might be picked in a different TU? |
lib/Sema/SemaType.cpp | ||
---|---|---|
5177–5179 | I think I'd prefer to switch over these diagnostics, so the primary diagnostic says "I needed the inheritance model here, but the class was incomplete, so I picked one", and the note says "here's the forward declaration; you can add an explicit inheritance model here to suppress the diagnostic" along with a fixit. |
Maybe this should also mention that (a) this happened because the class type was incomplete at the point where the inheritance model was first required, and (b) a different inheritance model might be picked in a different TU?