[PATCH] D12904: fix for assertion fail for pragma weak on typedef

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 06:33:32 PDT 2015


aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added a comment.

Thanks for this!


================
Comment at: test/CodeGen/pragma-weak.c:63
@@ -62,1 +62,3 @@
+typedef int __td3;
+#pragma weak td3 = __td3 // expected-warning {{weak identifier '__td3' never declared}}
 
----------------
This diagnostic isn't useful to the user; __td3 was declared as a typedef declaration. I would prefer something a bit more user-friendly; ideally using diag::warn_attribute_wrong_decl_type.


http://reviews.llvm.org/D12904





More information about the cfe-commits mailing list