<html><body><div>On Oct 17, 2011, at 06:12 PM, Chandler Carruth <chandlerc@google.com> wrote:<br><br></div><div><blockquote type="cite"><div class="msg-quote"><div class="gmail_quote">On Mon, Oct 17, 2011 at 9:06 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" data-mce-href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">Erik, if this bug affects the 3.0 branch, please ask Bill to pull this commit into the branch.<br></blockquote><div><br></div><div>It does. Bill CC-ed.</div></div></div></blockquote><span> </span></div><div>Dunno if I still need to request it now, but better safe than sorry:</div><div><br></div><div>Bill, could you pull this in the 3.0 branch please? Without the patch clang will generate 2 instead of 1 AST node for each access specifier in a C++ class.</div><div><br></div><div>-- Erik.</div><div><br></div><div><br><blockquote type="cite"><div class="msg-quote"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" data-mce-style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><br>        - Doug<br><div class="HOEnZb"><div class="h5"><br> On Oct 17, 2011, at 2:54 AM, Erik Verbruggen wrote:<br> <br> > Author: erikjv<br> > Date: Mon Oct 17 04:54:52 2011<br> > New Revision: 142186<br> ><br> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=142186&view=rev" data-mce-href="http://llvm.org/viewvc/llvm-project?rev=142186&view=rev">http://llvm.org/viewvc/llvm-project?rev=142186&view=rev</a><br> > Log:<br> > Fixed merge-mistake where ActOnAccessSpecifier was called twice for every access specifier. The testcase has been changed to catch this too.<br> ><br> > Modified:<br> >    cfe/trunk/lib/Parse/ParseDeclCXX.cpp<br> >    cfe/trunk/test/Index/annotate-attribute.cpp<br> ><br> > Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp<br> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=142186&r1=142185&r2=142186&view=diff" data-mce-href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=142186&r1=142185&r2=142186&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=142186&r1=142185&r2=142186&view=diff</a><br> > ==============================================================================<br> > --- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)<br> > +++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Mon Oct 17 04:54:52 2011<br> > @@ -2147,11 +2147,6 @@<br> >         SourceLocation EndLoc;<br> >         if (Tok.is(tok::colon)) {<br> >           EndLoc = Tok.getLocation();<br> > -          if (Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc,<br> > -                                           AccessAttrs.getList())) {<br> > -            // found another attribute than only annotations<br> > -            AccessAttrs.clear();<br> > -          }<br> >           ConsumeToken();<br> >         } else if (Tok.is(tok::semi)) {<br> >           EndLoc = Tok.getLocation();<br> > @@ -2163,7 +2158,13 @@<br> >           Diag(EndLoc, diag::err_expected_colon)<br> >             << FixItHint::CreateInsertion(EndLoc, ":");<br> >         }<br> > -        Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc);<br> > +<br> > +        if (Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc,<br> > +                                         AccessAttrs.getList())) {<br> > +          // found another attribute than only annotations<br> > +          AccessAttrs.clear();<br> > +        }<br> > +<br> >         continue;<br> >       }<br> ><br> ><br> > Modified: cfe/trunk/test/Index/annotate-attribute.cpp<br> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-attribute.cpp?rev=142186&r1=142185&r2=142186&view=diff" data-mce-href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-attribute.cpp?rev=142186&r1=142185&r2=142186&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/annotate-attribute.cpp?rev=142186&r1=142185&r2=142186&view=diff</a><br> > ==============================================================================<br> > --- cfe/trunk/test/Index/annotate-attribute.cpp (original)<br> > +++ cfe/trunk/test/Index/annotate-attribute.cpp Mon Oct 17 04:54:52 2011<br> > @@ -17,17 +17,17 @@<br> > };<br> ><br> > // CHECK: ClassDecl=Test:3:7 (Definition) Extent=[3:1 - 17:2]<br> > -// CHECK: CXXAccessSpecifier=:4:1 (Definition) Extent=[4:1 - 4:8]<br> > -// CHECK: CXXMethod=aMethod:5:51 Extent=[5:3 - 5:60]<br> > -// CHECK: attribute(annotate)=spiffy_method Extent=[5:18 - 5:43]<br> > -// CHECK: CXXAccessSpecifier=:7:1 (Definition) Extent=[7:1 - 7:43]<br> > -// CHECK: attribute(annotate)=works Extent=[7:23 - 7:40]<br> > -// CHECK: CXXMethod=anotherMethod:8:8 Extent=[8:3 - 8:23]<br> > -// CHECK: attribute(annotate)=works Extent=[7:23 - 7:40]<br> > -// CHECK: CXXAccessSpecifier=:10:1 (Definition) Extent=[10:1 - 10:53]<br> > -// CHECK: attribute(annotate)=investigations Extent=[10:24 - 10:50]<br> > -// CHECK: CXXMethod=inlineMethod:12:8 (Definition) Extent=[12:3 - 12:25]<br> > -// CHECK: attribute(annotate)=investigations Extent=[10:24 - 10:50]<br> > -// CHECK: CompoundStmt= Extent=[12:23 - 12:25]<br> > -// CHECK: CXXAccessSpecifier=:14:1 (Definition) Extent=[14:1 - 14:11]<br> > -// CHECK: CXXMethod=methodWithoutAttribute:16:8 Extent=[16:3 - 16:32]<br> > +// CHECK-NEXT: CXXAccessSpecifier=:4:1 (Definition) Extent=[4:1 - 4:8]<br> > +// CHECK-NEXT: CXXMethod=aMethod:5:51 Extent=[5:3 - 5:60]<br> > +// CHECK-NEXT: attribute(annotate)=spiffy_method Extent=[5:18 - 5:43]<br> > +// CHECK-NEXT: CXXAccessSpecifier=:7:1 (Definition) Extent=[7:1 - 7:43]<br> > +// CHECK-NEXT: attribute(annotate)=works Extent=[7:23 - 7:40]<br> > +// CHECK-NEXT: CXXMethod=anotherMethod:8:8 Extent=[8:3 - 8:23]<br> > +// CHECK-NEXT: attribute(annotate)=works Extent=[7:23 - 7:40]<br> > +// CHECK-NEXT: CXXAccessSpecifier=:10:1 (Definition) Extent=[10:1 - 10:53]<br> > +// CHECK-NEXT: attribute(annotate)=investigations Extent=[10:24 - 10:50]<br> > +// CHECK-NEXT: CXXMethod=inlineMethod:12:8 (Definition) Extent=[12:3 - 12:25]<br> > +// CHECK-NEXT: attribute(annotate)=investigations Extent=[10:24 - 10:50]<br> > +// CHECK-NEXT: CompoundStmt= Extent=[12:23 - 12:25]<br> > +// CHECK-NEXT: CXXAccessSpecifier=:14:1 (Definition) Extent=[14:1 - 14:11]<br> > +// CHECK-NEXT: CXXMethod=methodWithoutAttribute:16:8 Extent=[16:3 - 16:32]<br> ><br> ><br> > _______________________________________________<br> > cfe-commits mailing list<br> > <a href="mailto:cfe-commits@cs.uiuc.edu" data-mce-href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" data-mce-href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br> <br> _______________________________________________<br> cfe-commits mailing list<br> <a href="mailto:cfe-commits@cs.uiuc.edu" data-mce-href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" data-mce-href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br></div></div></blockquote></div><br></div></blockquote></div></body></html>