Re: [PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-02-01 Thread Hans Wennborg via cfe-commits
On Tue, Jan 31, 2017 at 3:23 PM, Richard Smith wrote: > On 31 January 2017 at 14:49, Hans Wennborg wrote: >> >> Richard, what do you think? I don't believe this fixes a 3.9 >> regression, but the fix looks small, so it might be worth it. > > > I think

Re: [PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-01-31 Thread Richard Smith via cfe-commits
On 31 January 2017 at 14:49, Hans Wennborg wrote: > Richard, what do you think? I don't believe this fixes a 3.9 > regression, but the fix looks small, so it might be worth it. > I think on the whole the benefit of this change outweighs the risk of it regressing something.

Re: [PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-01-31 Thread Hans Wennborg via cfe-commits
Richard, what do you think? I don't believe this fixes a 3.9 regression, but the fix looks small, so it might be worth it. On Tue, Jan 31, 2017 at 12:07 PM, Akira Hatanaka wrote: > Thanks for the review. r293678. > > Should this be merged to 4.0? > >> On Jan 31, 2017, at

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-01-31 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293678: [Sema] Transform a templated name before looking it up in (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D24969?vs=82134=86474#toc Repository: rL LLVM

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-01-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Richard, does the updated patch look OK? https://reviews.llvm.org/D24969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/TreeTransform.h:8766-8767 NamedDecl *FirstQualifierInScope = nullptr; + DeclarationNameInfo MemberNameInfo = + getDerived().TransformDeclarationNameInfo(E->getMemberNameInfo()); rsmith wrote: >

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 82134. ahatanak marked 2 inline comments as done. ahatanak added a comment. Add code for error recovery. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h test/SemaCXX/destructor.cpp Index:

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-20 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Looks good, other than error recovery. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:4851 + DeclarationNameInfo NameInfo(Name, D->getLocation()); + Name = SubstDeclarationNameInfo(NameInfo, TemplateArgs).getName(); +

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 82120. ahatanak added a comment. Call TransformDeclarationNameInfo unconditionally to transform NameInfo rather than doing so only for destructors. I think this is a cleaner fix. https://reviews.llvm.org/D24969 Files:

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-12-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81172. ahatanak added a comment. Rebase and ping. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h test/SemaCXX/destructor.cpp Index: test/SemaCXX/destructor.cpp

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-11-03 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76883. ahatanak added a comment. Rebase. Pass the destructor's DeclarationNameInfo to the call to RebuildMemberExpr rather than getting it inside RebuildMemberExpr. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-11 Thread Akira Hatanaka via cfe-commits
ahatanak marked an inline comment as done. ahatanak added a comment. (I'm replying to the comment near TreeTransform.h:11967 because phab doesn't let me hit save) It looks like RebuildCXXPseudoDestructorExpr isn't even called because a MemberExpr is created instead of a

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74324. ahatanak added a comment. Added a call to operator C1* in test case. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h test/SemaCXX/destructor.cpp Index: test/SemaCXX/destructor.cpp

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaTemplateInstantiateDecl.cpp:4849 + DeclarationName Name = D->getDeclName(); + if (auto *DD = dyn_cast(D)) +Name = ahatanak wrote: > rsmith wrote: > > Do we need to do this for conversion

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. > rsmith wrote in SemaTemplateInstantiateDecl.cpp:4849 > Do we need to do this for conversion function names too? (Eg, `operator > C1*`) I added a definition of "operator C1*" and called it in C1::foo1. I didn't see any crashes or asserts. Calls to a

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-04 Thread Richard Smith via cfe-commits
rsmith added inline comments. > SemaTemplateInstantiateDecl.cpp:4849 > + DeclarationName Name = D->getDeclName(); > + if (auto *DD = dyn_cast(D)) > +Name = Do we need to do this for conversion function names too? (Eg, `operator C1*`) https://reviews.llvm.org/D24969

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D24969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2016-09-27 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, rsmith. ahatanak added a subscriber: cfe-commits. This fixes PR30361. clang was failing to compile the test case because it was passing "~C1" instead of "~C1" to FindInstantiatedDecl and RebuildMemberExpr.