r317532 - Clarify the error message for unsupported aliases on Darwin

Alex Lorenz via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 16:31:19 PST 2017


Author: arphaman
Date: Mon Nov  6 16:31:19 2017
New Revision: 317532

URL: http://llvm.org/viewvc/llvm-project?rev=317532&view=rev
Log:
Clarify the error message for unsupported aliases on Darwin

rdar://35109556

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Sema/attr-alias.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=317532&r1=317531&r2=317532&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Nov  6 16:31:19 2017
@@ -2778,7 +2778,7 @@ def err_attribute_weakref_not_global_con
 def err_attribute_weakref_without_alias : Error<
   "weakref declaration of %0 must also have an alias attribute">;
 def err_alias_not_supported_on_darwin : Error <
-  "only weak aliases are supported on darwin">;
+  "aliases are not supported on darwin">;
 def err_alias_to_undefined : Error<
   "%select{alias|ifunc}0 must point to a defined %select{variable or |}1function">;
 def warn_alias_to_weak_alias : Warning<

Modified: cfe/trunk/test/Sema/attr-alias.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-alias.c?rev=317532&r1=317531&r2=317532&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-alias.c (original)
+++ cfe/trunk/test/Sema/attr-alias.c Mon Nov  6 16:31:19 2017
@@ -2,7 +2,4 @@
 
 void g() {}
 
-// It is important that the following string be in the error message. The gcc
-// testsuite looks for it to decide if a target supports aliases.
-
-void f() __attribute__((alias("g"))); //expected-error {{only weak aliases are supported}}
+void f() __attribute__((alias("g"))); //expected-error {{aliases are not supported on darwin}}




More information about the cfe-commits mailing list