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
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.
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
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
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
ahatanak added inline comments.
Comment at: lib/Sema/TreeTransform.h:8766-8767
NamedDecl *FirstQualifierInScope = nullptr;
+ DeclarationNameInfo MemberNameInfo =
+ getDerived().TransformDeclarationNameInfo(E->getMemberNameInfo());
rsmith wrote:
>
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:
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();
+
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:
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
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
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
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
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
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
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
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
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.
18 matches
Mail list logo