[PATCH] D16951: [MS ABI] dllimport'd class cannot have constexpr ctors

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 7 13:51:07 PST 2016


thakis added a comment.

Cool, lgtm. Maybe we'll have to downgrade this to a warning eventually since cl allows it, but for now let's see how this goes.


================
Comment at: test/SemaCXX/dllimport.cpp:1269
@@ +1268,3 @@
+  virtual ~PR26506_test2() {}
+  constexpr PR26506_test2() {} // expected-error{{constructor cannot be marked constexpr}}
+};
----------------
majnemer wrote:
> thakis wrote:
> > nit: I feel diagnostics are easier to understand if their text is stand-alone and not spread across diag and its note. That is "dllimported constructors cannot be marked constexpr" "note: dllimported here" or something like this (this also helps with the mythical localization of diagnostics).
> I chose this style because it is most consistent with our diagnostic for a `constexpr` constructor for a class with virtual bases.
Hm, I suppose I feel we should change those too then :-) (but that's a discussion for somewhere else then)


http://reviews.llvm.org/D16951





More information about the cfe-commits mailing list