[cfe-commits] Patch to fix warning on qualified typedef with 'unused' attribute

Jason Haslam jason.haslam at gmail.com
Mon Sep 10 14:53:12 PDT 2012


This test case incorrectly warns because the diagnostic fails to look through the qualifier when it checks the typedef's 'unused' attribute:
1 namespace NS { typedef int Int __attribute__((unused)); }
2 void f() {
3   NS::Int i; // bogus unused variable warning
4 }

The attached patch contains a fix and test case.

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120910/b891570d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused_attr_qualified_typedef.diff
Type: application/octet-stream
Size: 1078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120910/b891570d/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120910/b891570d/attachment-0001.html>


More information about the cfe-commits mailing list