[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D57464#1462342 , @ebevhan wrote: > In D57464#1438213 , @Anastasia wrote: > > > > I think I would lean towards the latter since it means less fudging > > > around with a whole bunch of

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-04-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D57464#1438213 , @Anastasia wrote: > > I think I would lean towards the latter since it means less fudging around > > with a whole bunch of unrelated methods. Do @rjmccall or @rsmith have any > > further opinions on this? > >

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > I think I would lean towards the latter since it means less fudging around > with a whole bunch of unrelated methods. Do @rjmccall or @rsmith have any > further opinions on this? Ok, I can change the patch to prototype this approach. I might need some example tes

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sorry, I've gotten trapped under a backlog and haven't had time to think much about this. I don't want to block progress here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57464/new/ https://reviews.llvm.org/D57464

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-14 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D57464#1425904 , @Anastasia wrote: > I think not. :( But I am wondering if we could proceed for now in some > general direction and then make any improvements later. Probably the biggest > part of this patch is not going to ch

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D57464#1421493 , @ebevhan wrote: > Any more input on this? I think not. :( But I am wondering if we could proceed for now in some general direction and then make any improvements later. Probably the biggest part of this pa

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-03-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Any more input on this? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57464/new/ https://reviews.llvm.org/D57464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-07 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: rsmith. rjmccall added a comment. Hmm. Richard, I've mostly let you stay out of this, but do you have any thoughts about the right manage to parse attributes here? We want to allow `address_space` attributes to be written in the method-qualifiers list, but when we d

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added a comment. Btw, if we would implement something like this: http://lists.llvm.org/pipermail/cfe-dev/2019-January/060798.html Would it allow you to switch to more generic address space attributes and therefore help to decrease diverging f

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-06 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D57464#1386614 , @rjmccall wrote: > Moving parsed attributes between lists isn't unreasonable if that's what you > have to do; we already do that when processing the ObjC ARC qualifiers. The > ambiguity with function attribut

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Moving parsed attributes between lists isn't unreasonable if that's what you have to do; we already do that when processing the ObjC ARC qualifiers. The ambiguity with function attributes is pretty much inherent. Alternatively, you shouldn't feel like you can't impose

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-05 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Anastasia wrote: > > > ebevhan wrote: > > > > Anastasia wrote: > > > > > ebevhan wrote: > > > > > > Anastasia wrote: > > > > > > > Anast

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > Anastasia wrote: > > > > ebevhan wrote: > > > > > Anastasia wrote: >

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-05 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Anastasia wrote: > > > ebevhan wrote: > > > > Anastasia wrote: > > > > > Anastasia wrote: > > > > > > ebevhan wrote: > > > > > > > Is th

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > Anastasia wrote: > > > > Anastasia wrote: > > > > > ebevhan wrote: >

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/SemaCXX/address-space-method-overloading.cpp:28 + //inas4.bar(); + noas.bar(); // expected-error{{call to member function 'bar' is ambiguous}} +} ebevhan wrote: > rjmccall wrote: > > ebevhan wrote: > > > Anasta

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: test/SemaCXX/address-space-method-overloading.cpp:28 + //inas4.bar(); + noas.bar(); // expected-error{{call to member function 'bar' is ambiguous}} +} rjmccall wrote: > ebevhan wrote: > > Anastasia wrote: > > > ebevh

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: test/SemaCXX/address-space-method-overloading.cpp:28 + //inas4.bar(); + noas.bar(); // expected-error{{call to member function 'bar' is ambiguous}} +} ebevhan wrote: > Anastasia wrote: > > ebevhan wrote: > > > Just

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Anastasia wrote: > > > Anastasia wrote: > > > > ebevhan wrote: > > > > > Is there a reason that the attributes are parsed here and not i

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-02-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } ebevhan wrote: > Anastasia wrote: > > Anastasia wrote: > > > ebevhan wrote: > > > > Is there a reason that the attributes are pa

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > Anastasia wrote: > > ebevhan wrote: > > > Is there a reason that the attributes are parsed here and not in > > > `ParseFunctionDeclarator` like the rest o

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Is there a reason that the attributes are parsed here and not in > > `ParseFunctionDeclar

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2303 +auto &Function = DeclaratorInfo.getFunctionTypeInfo(); +auto &MQ = Function.getOrCreateMethodQualifiers(); +for (auto &attr : DeclaratorInfo.getAt

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2309 + attr.getScopeName(), attr.getScopeLoc(), &AU, + attr.getNumArgs(), ParsedAttr::AS_GNU); +

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2309 + attr.getScopeName(), attr.getScopeLoc(), &AU, + attr.getNumArgs(), ParsedAttr::AS_GNU); +attr.setInvalid(); Are

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, ebevhan. Here is my attempt to generalize the earlier work on method overloading with address spaces https://reviews.llvm.org/D55850 to work in C++ mode (not just OpenCL!). This implementation doesn't apply yet to templated a