[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305812: Fix for Bug 33471: Preventing operator auto from resolving to a template… (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D34370?vs=103224&id=103235#toc Repository:

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaLookup.cpp:870 + DeclarationName::CXXConversionFunctionName && + R.getLookupName().getCXXNameType()->getContainedDeducedType() && + R.getLookupName() rsmith wrote: > Maybe only call thi

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good, thanks! Comment at: lib/Sema/SemaLookup.cpp:870 + DeclarationName::CXXConversionFunctionName && + R.getLookupName().getCXXNameType()->getContainedDe

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-20 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 103224. erichkeane marked an inline comment as done. erichkeane added a comment. Hi @rsmith Thanks for the quick response! I spent a while going over it, and think I have what you were looking for. I Also added the operator auto * tests. https://revie

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaLookup.cpp:870-872 +auto *Ty = +dyn_cast(R.getLookupName().getCXXNameType()); +if (Ty && Ty->isUndeducedType()) This is not sufficient to catch cases such as `operator auto*`, and one day the

[PATCH] D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

2017-06-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. As the bug report says, struct A { template operator T(); }; void foo() { A().operator auto(); } causes: "undeduced type in IR-generation UNREACHABLE executed at llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp:208!" The problem is that in this case, "T