<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 10, 2012, at 2:53 PM, Jason Haslam <<a href="mailto:jason.haslam@gmail.com">jason.haslam@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This test case incorrectly warns because the diagnostic fails to look through the qualifier when it checks the typedef's 'unused' attribute:<div><p style="font-family: courier; font-size: 10pt; "><span style="color: rgb(0, 0, 128); font-weight: bold; "></span><b>1</b> <span style="color: rgb(0, 0, 128); font-weight: bold; ">namespace</span><span style="color: rgb(128, 128, 128); "> </span>NS<span style="color: rgb(128, 128, 128); "> </span><span style="font-weight: bold; ">{</span><span style="color: rgb(128, 128, 128); "> </span><span style="color: rgb(0, 0, 128); font-weight: bold; ">typedef</span><span style="color: rgb(128, 128, 128); "> </span><span style="color: rgb(0, 0, 128); font-weight: bold; ">int</span><span style="color: rgb(128, 128, 128); "> </span>Int<span style="color: rgb(128, 128, 128); "> </span>__attribute__<span style="font-weight: bold; ">((</span>unused<span style="font-weight: bold; ">));</span><span style="color: rgb(128, 128, 128); "> </span><span style="font-weight: bold; ">}</span><span style="color: rgb(128, 128, 128); "><br></span><b>2</b> <span style="color: rgb(0, 0, 128); font-weight: bold; ">void</span><span style="color: rgb(128, 128, 128); "> </span>f<span style="font-weight: bold; ">()</span><span style="color: rgb(128, 128, 128); "> </span><span style="font-weight: bold; ">{</span><span style="color: rgb(128, 128, 128); "><br></span><b>3</b> <span style="color: rgb(128, 128, 128); ">  </span>NS<span style="font-weight: bold; ">::</span>Int<span style="color: rgb(128, 128, 128); "> </span>i<span style="font-weight: bold; ">;</span><span style="color: rgb(128, 128, 128); "> </span><span style="color: rgb(0, 0, 255); font-style: italic; ">// bogus unused variable warning<br></span><b>4</b> <span style="font-weight: bold; ">}</span></p></div><div>The attached patch contains a fix and test case.</div></div></blockquote><br></div><div>LGTM, thanks!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br></div><br></body></html>