<div>On Tue, Oct 2, 2012 at 4:23 PM, Michael Han <span dir="ltr"><<a href="mailto:Michael.Han@autodesk.com" target="_blank">Michael.Han@autodesk.com</a>></span> wrote:</div><div class="gmail_quote"><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
Following the feedback from Richard [1], here is the updated patch that's trying to improve clang support of C++11 attribute. Thanks!<br></blockquote></div><div><div><br></div><div>The patch looks good, just a few minor nits then feel free to commit.</div>


<div><br></div><div>> +++ lib/Parse/ParseDeclCXX.cpp<span style="white-space:pre-wrap">      </span>(working copy)</div></div><div><div>> @@ -2963,46 +2978,38 @@</div></div><div>> [...]</div><div>> +    // parse attribute arguments</div>


<div><div><br></div><div>Please capitalize comments, per <a href="http://llvm.org/docs/CodingStandards.html#commenting" target="_blank">http://llvm.org/docs/CodingStandards.html#commenting</a></div></div></div><br><div><div>

> +++ lib/Parse/ParseDecl.cpp<span style="white-space:pre-wrap">     </span>(working copy)</div>
<div>> @@ -154,7 +154,8 @@</div><div>>            Eof.setLocation(Tok.getLocation());</div><div>>            LA->Toks.push_back(Eof);</div><div>>          } else {</div><div>> -          ParseGNUAttributeArgs(AttrName, AttrNameLoc, attrs, endLoc);</div>


<div>> +          ParseGNUAttributeArgs(AttrName, AttrNameLoc, attrs, endLoc,</div><div>> +                                0, AttrNameLoc, AttributeList::AS_GNU);</div></div><div><br></div><div>This should be SourceLocation(), rather than AttrNameLoc, since there isn't a scope token (I see that you were preserving the existing behavior, but we may as well fix this). Likewise in the other two calls without a scope token. If something is relying on the source location being valid here, we'll need to fix it to not do so (feel free to defer this tweak in that case).</div>


<div><br></div><div><div>> @@ -173,11 +174,15 @@</div><div>>  }</div><div>>  </div><div>>  </div><div>> -/// Parse the arguments to a parameterized GNU attribute</div><div>> +/// Parse the arguments to a parameterized GNU attribute or</div>


<div>> +/// a C++ 11 attribute in "gnu" namespace.</div></div><div><br></div><div>C++11 is usually written without the space.</div><div><br></div><div><div>> +++ test/Parser/cxx0x-attributes.cpp<span style="white-space:pre-wrap">     </span>(working copy)</div>


<div>> @@ -4,7 +4,7 @@</div><div>>  namespace std {</div><div>>    typedef decltype(sizeof(int)) size_t;</div><div>>  </div><div>> -  // libc++'s implementation</div><div>> +  // libc++'s implementation<span style="white-space:pre-wrap">       </span></div>


</div><div><br></div><div>An extra tab has appeared at the end of this line.</div>
</div><br>