Re: recordDecl() AST matcher

2015-09-17 Thread Aaron Ballman via cfe-commits
I've commit in r247885 and r247886. I will add something to the release notes, and watch the bots to see if any tests got missed (since I did my development on Windows). Thank you! ~Aaron On Wed, Sep 16, 2015 at 7:49 PM, Manuel Klimek wrote: > LG, ship it. > > On Wed, Sep 16, 2015 at 2:03 PM Aa

Re: recordDecl() AST matcher

2015-09-16 Thread Manuel Klimek via cfe-commits
LG, ship it. On Wed, Sep 16, 2015 at 2:03 PM Aaron Ballman wrote: > Attached is an updated patch for clang-tools-extra that does not have > my in-progress, not-related-to-any-of-this code in it. ;-) > > ~Aaron > > On Wed, Sep 16, 2015 at 4:04 PM, Aaron Ballman > wrote: > > Quick ping. I know th

Re: recordDecl() AST matcher

2015-09-16 Thread Aaron Ballman via cfe-commits
Attached is an updated patch for clang-tools-extra that does not have my in-progress, not-related-to-any-of-this code in it. ;-) ~Aaron On Wed, Sep 16, 2015 at 4:04 PM, Aaron Ballman wrote: > Quick ping. I know this is a fairly gigantic patch, but I'm hoping for > a relatively quick review turna

Re: recordDecl() AST matcher

2015-09-16 Thread Aaron Ballman via cfe-commits
Quick ping. I know this is a fairly gigantic patch, but I'm hoping for a relatively quick review turnaround because of potential merge conflicts with people doing a fair amount of work on clang-tidy lately. Everything should be pretty straight-forward (it's all just renames, no semantic changes int

Re: recordDecl() AST matcher

2015-09-15 Thread Richard Smith via cfe-commits
On Mon, Sep 14, 2015 at 2:41 PM, Manuel Klimek wrote: > > On Mon, Sep 14, 2015 at 2:29 PM Aaron Ballman > wrote: > >> On Mon, Sep 14, 2015 at 4:38 PM, Manuel Klimek wrote: >> > >> > >> > On Mon, Sep 14, 2015 at 12:26 PM Aaron Ballman >> > wrote: >> >> >> >> On Mon, Sep 14, 2015 at 2:45 PM, Dani

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
On Mon, Sep 14, 2015 at 5:47 PM, Daniel Jasper wrote: > Btw, I think generating them, potentially into several different headers to > work around the compile time issue isn't such a bad idea. I'm not going to start with this approach, but think it may be worth exploring at some point. ;-) ~Aaron

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
On Mon, Sep 14, 2015 at 5:44 PM, Daniel Jasper wrote: > Ok. I am happy with this then. > > (Just personally grumpy having to write > cxxRecordDecl(has(cxxConstructorDecl(..))) in the future ;-) ). I share your grumpiness about the cxxConstructorDecl, but probably won't share it when we add objcCo

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
Btw, I think generating them, potentially into several different headers to work around the compile time issue isn't such a bad idea. On Mon, Sep 14, 2015 at 11:45 PM, Manuel Klimek wrote: > Feel free to rename the AST nodes :) > > On Mon, Sep 14, 2015, 2:44 PM Daniel Jasper wrote: > >> Ok. I a

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
Feel free to rename the AST nodes :) On Mon, Sep 14, 2015, 2:44 PM Daniel Jasper wrote: > Ok. I am happy with this then. > > (Just personally grumpy having to write > cxxRecordDecl(has(cxxConstructorDecl(..))) in the future ;-) ). > > On Mon, Sep 14, 2015 at 11:41 PM, Manuel Klimek wrote: > >>

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
Ok. I am happy with this then. (Just personally grumpy having to write cxxRecordDecl(has(cxxConstructorDecl(..))) in the future ;-) ). On Mon, Sep 14, 2015 at 11:41 PM, Manuel Klimek wrote: > > > On Mon, Sep 14, 2015 at 2:29 PM Aaron Ballman > wrote: > >> On Mon, Sep 14, 2015 at 4:38 PM, Manue

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
On Mon, Sep 14, 2015 at 2:29 PM Aaron Ballman wrote: > On Mon, Sep 14, 2015 at 4:38 PM, Manuel Klimek wrote: > > > > > > On Mon, Sep 14, 2015 at 12:26 PM Aaron Ballman > > wrote: > >> > >> On Mon, Sep 14, 2015 at 2:45 PM, Daniel Jasper > wrote: > >> > By this point, I see that change might be

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
On Mon, Sep 14, 2015 at 4:38 PM, Manuel Klimek wrote: > > > On Mon, Sep 14, 2015 at 12:26 PM Aaron Ballman > wrote: >> >> On Mon, Sep 14, 2015 at 2:45 PM, Daniel Jasper wrote: >> > By this point, I see that change might be profitable overall. However, >> > lets >> > completely map this out. Chan

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
; >> >>>>> >> >> better solution? > >> >>>>> >> >> > >> >>>>> >> >> Basically, I see a few ways to solve this (and there may be > >> >>>>> >> >> other > >> >>>>> >> >

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
gt; >> cxxRecordDecl. This does not match the AST because we have no >> >>>>> >> >> StructDecl or UnionDecl types. The more I think about this >> >>>>> >> >> option, the >> >>>>> >> >> less I like it. It's easy to

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
t;> >>>>> >> >> to >> >>>>> >> >> the AST. >> >>>>> >> >> 2) Make recordDecl match RecordDecl, don't touch other >> matchers. >> >>>>> >> >> Add >> >>>>> >>

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
>> >> >> break > >>>>> >> >> code. I think that I prefer this approach, but it depends > heavily > >>>>> >> >> on > >>>>> >> >> what "may break code" looks like in practice. > >>>>> >> &

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
This doesn't match the AST because we will have >>>>> >> >> matchers taking a RecordDecl when the AST would require a >>>>> >> >> CXXRecordDecl, but is likely to break less code. >>>>> >> > &g

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
gt;> >> >>>> >> If this is an acceptable failure rate, I can also update the failing >>>> >> matchers to use cxxRecordDecl instead of recordDecl where applicable. >>>> >> Doing some spot-checking of the failing code, the failures are ones >>>> w

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
niel for another opinion. I think this is fine, but I'd prefer not >>> to >>> > end up in a meme :) >>> >>> FWIW, the vast majority of the errors are in ASTMatchersTests. There >>> were only a few in actual real-world uses (71 in tests, 14 in re

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
>> >> >> >> > Richard: if CXXRecordDecl was really an implementation detail, it >> >> >> > would >> >> >> > be >> >> >> > hidden behind a RecordDecl class, as an implementation detail. The >> >> >> >

Re: recordDecl() AST matcher

2015-09-14 Thread Daniel Jasper via cfe-commits
n't matter - in the end, it's > in > >> >> > the > >> >> > AST API. > >> >> > > >> >> >> > >> >> >> > >> >> >> ~Aaron > >> >> >> > >> >

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
;s in >>> >> > the >>> >> > AST API. >>> >> > >>> >> >> >>> >> >> >>> >> >> ~Aaron >>> >> >> >>> >> >> > >>> >> >> > On Fri, Sep 11, 2015

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
gt; > wrote: >> >> >> >> >> >> >> >> Richard! We need an informed opinion :D >> >> >> >> >> >> >> >> On Fri, Sep 11, 2015 at 3:07 PM Aaron Ballman >> >> >> >> >> >> >> &

Re: recordDecl() AST matcher

2015-09-14 Thread Manuel Klimek via cfe-commits
; >>> Ping? > >> >> >>> > >> >> >>> On Tue, Sep 8, 2015 at 9:26 AM, Manuel Klimek > > >> >> >>> wrote: > >> >> >>> > On Tue, Sep 8, 2015 at 3:23 PM Aaron Ballman > >> >> >>> > > >> >

Re: recordDecl() AST matcher

2015-09-14 Thread Aaron Ballman via cfe-commits
gt;> >> >> >>> >> On Tue, Sep 8, 2015 at 9:18 AM, Manuel Klimek >> >> >>> >> >> >> >>> >> wrote: >> >> >>> >> > On Tue, Sep 8, 2015 at 2:23 PM Aaron Ballman >> >> >>> >> > >>

Re: recordDecl() AST matcher

2015-09-12 Thread Manuel Klimek via cfe-commits
;> > >> >>> >> >> On Tue, Sep 8, 2015 at 5:40 AM, Manuel Klimek > >> >>> >> >> > >> >>> >> >> wrote: > >> >>> >> >> > Yea, we had that discussion a few times, an

Re: recordDecl() AST matcher

2015-09-12 Thread Aaron Ballman via cfe-commits
>> > ended up in the state we're in. >> >>> >> >> > We definitely had a time where we switched to just using the >> >>> >> >> > exact >> >>> >> >> > same >> >>> >> >> > name >> >&

Re: recordDecl() AST matcher

2015-09-12 Thread Manuel Klimek via cfe-commits
>> > exact > >>> >> >> > same > >>> >> >> > name > >>> >> >> > as the node's class name for the matchers. > >>> >> >> > I *think* we didn't do it for cxxRecordDecl, because

Re: recordDecl() AST matcher

2015-09-11 Thread Aaron Ballman via cfe-commits
t; I *think* we didn't do it for cxxRecordDecl, because Richard said >>> >> >> > that's >>> >> >> > a >>> >> >> > relic we should get rid of anyway, but I'm not sure. >>> >> >> >>> >> >> FWI

Re: recordDecl() AST matcher

2015-09-11 Thread Richard Smith via cfe-commits
; >> >> > relic we should get rid of anyway, but I'm not sure. >> >> >> >> >> >> FWIW, I think the state we're in is the worst of all worlds. It's >> not >> >> >> intuitive that recordDecl() doesn't match a

Re: recordDecl() AST matcher

2015-09-11 Thread Manuel Klimek via cfe-commits
et rid of anyway, but I'm not sure. > >> >> > >> >> FWIW, I think the state we're in is the worst of all worlds. It's not > >> >> intuitive that recordDecl() doesn't match a struct in C mode, and as > >> >> it stands, there

Re: recordDecl() AST matcher

2015-09-11 Thread Aaron Ballman via cfe-commits
match a struct in C mode, and as >> >> it stands, there is no way to match a struct or union declaration in C >> >> at all. >> > >> > >> > Agreed. Best intentions. Worst possible outcome. That's software >> > development >> > :) &

Re: recordDecl() AST matcher

2015-09-08 Thread Manuel Klimek via cfe-commits
of all worlds. It's not > >> intuitive that recordDecl() doesn't match a struct in C mode, and as > >> it stands, there is no way to match a struct or union declaration in C > >> at all. > > > > > > Agreed. Best intentions. Worst possible outcome

Re: recordDecl() AST matcher

2015-09-08 Thread Aaron Ballman via cfe-commits
ch a struct or union declaration in C >> at all. > > > Agreed. Best intentions. Worst possible outcome. That's software development > :) > >> > >> > On Fri, Sep 4, 2015 at 8:32 PM Aaron Ballman >> > wrote: >> >> >> >>

Re: recordDecl() AST matcher

2015-09-08 Thread Manuel Klimek via cfe-commits
development :) > > > On Fri, Sep 4, 2015 at 8:32 PM Aaron Ballman > wrote: > >> > >> It turns out that the recordDecl() AST matcher doesn't match > >> RecordDecl objects; instead, it matches CXXRecordDecl objects. This > >> is... unfortunate... as

Re: recordDecl() AST matcher

2015-09-08 Thread Aaron Ballman via cfe-commits
ct in C mode, and as it stands, there is no way to match a struct or union declaration in C at all. > > On Fri, Sep 4, 2015 at 8:32 PM Aaron Ballman wrote: >> >> It turns out that the recordDecl() AST matcher doesn't match >> RecordDecl objects; instead, it matches CX

Re: recordDecl() AST matcher

2015-09-08 Thread Manuel Klimek via cfe-commits
ard said that's a relic we should get rid of anyway, but I'm not sure. On Fri, Sep 4, 2015 at 8:32 PM Aaron Ballman wrote: > It turns out that the recordDecl() AST matcher doesn't match > RecordDecl objects; instead, it matches CXXRecordDecl objects. This > is... unfortun

recordDecl() AST matcher

2015-09-04 Thread Aaron Ballman via cfe-commits
It turns out that the recordDecl() AST matcher doesn't match RecordDecl objects; instead, it matches CXXRecordDecl objects. This is... unfortunate... as it makes writing AST matchers more complicated because of having to translate between recordDecl()/CXXRecordDecl. It also makes it impossib