On Tue, May 27, 2014 at 7:53 PM, Nico Rieck <[email protected]> wrote:
>

This sounds reasonable, but MSVC doesn't seem to diagnose it. It seems
to happily compile the following:

  struct S {
    void __declspec(dllexport) foo() = delete;
    void __declspec(dllexport) bar() {}
  };

exporting bar(), but not foo(). My (pretty old unfortunately) MinGW
didn't error either.

> --- a/include/clang/Basic/DiagnosticSemaKinds.td
> +++ b/include/clang/Basic/DiagnosticSemaKinds.td
> @@ -2093,6 +2093,8 @@ def err_attribute_dll_redeclaration : Error<
>    "redeclaration of %q0 cannot add %q1 attribute">;
>  def err_attribute_dllimport_function_definition : Error<
>    "dllimport cannot be applied to non-inline function definition">;
> +def err_attribute_dll_deleted : Error<
> +  "attempt to delete %q0 function">;

I think "cannot" diagnostics are more common in Clang. How about
"cannot delete %q0 function".
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to