Thank you for the review. Landed as r165082. I'll tweak the SourceLocation in next patch. It fails some attribute tests (generate a slightly different diagnostic if using the SourceLocation()).
Thanks! Michael From: [email protected] [mailto:[email protected]] On Behalf Of Richard Smith Sent: Tuesday, October 02, 2012 5:40 PM To: Michael Han; cfe commits Subject: Re: [Patch] C++11 attribute parsing On Tue, Oct 2, 2012 at 4:23 PM, Michael Han <[email protected]<mailto:[email protected]>> wrote: Hi, Following the feedback from Richard [1], here is the updated patch that's trying to improve clang support of C++11 attribute. Thanks! The patch looks good, just a few minor nits then feel free to commit. > +++ lib/Parse/ParseDeclCXX.cpp (working copy) > @@ -2963,46 +2978,38 @@ > [...] > + // parse attribute arguments Please capitalize comments, per http://llvm.org/docs/CodingStandards.html#commenting > +++ lib/Parse/ParseDecl.cpp (working copy) > @@ -154,7 +154,8 @@ > Eof.setLocation(Tok.getLocation()); > LA->Toks.push_back(Eof); > } else { > - ParseGNUAttributeArgs(AttrName, AttrNameLoc, attrs, endLoc); > + ParseGNUAttributeArgs(AttrName, AttrNameLoc, attrs, endLoc, > + 0, AttrNameLoc, AttributeList::AS_GNU); 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). > @@ -173,11 +174,15 @@ > } > > > -/// Parse the arguments to a parameterized GNU attribute > +/// Parse the arguments to a parameterized GNU attribute or > +/// a C++ 11 attribute in "gnu" namespace. C++11 is usually written without the space. > +++ test/Parser/cxx0x-attributes.cpp (working copy) > @@ -4,7 +4,7 @@ > namespace std { > typedef decltype(sizeof(int)) size_t; > > - // libc++'s implementation > + // libc++'s implementation An extra tab has appeared at the end of this line.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
