[PATCH] MS ABI: Diagnose unspecified inheritance model ptrs in the best case
Richard Smith
richard at metafoo.co.uk
Fri Sep 26 19:29:32 PDT 2014
================
Comment at: lib/Sema/SemaType.cpp:5177-5179
@@ +5176,5 @@
+ IM == MSInheritanceAttr::Keyword_unspecified_inheritance) {
+ S.Diag(RD->getSourceRange().getBegin(),
+ diag::warn_unspecified_ms_inheritance);
+ S.Diag(Loc, diag::note_ms_inheritance_selected);
+ }
----------------
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.
http://reviews.llvm.org/D4651
More information about the cfe-commits
mailing list