[llvm-bugs] [Bug 25995] Unqualified lookup into dependent bases of class templates fails if class exists with the same name
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 12 14:35:28 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=25995
Reid Kleckner <rnk at google.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
--- Comment #3 from Reid Kleckner <rnk at google.com> ---
A different way of looking at the reduction:
struct NameConflict {};
template <typename B> struct A : B {
static void f(NameConflict p) {}
};
struct Base {
struct NameConflict {
typedef int type;
};
};
int main() { A<Base>::f(Base::NameConflict()); }
Clang correctly uses '::NameConflict' instead of 'Base::NameConflict' for the
type of the parameter 'p', while MSVC does not.
We can't match MSVC's behavior without doing token based template
instantiation. Clang *needs* to be able to somehow parse the template prior to
instantiation. Even -fdelayed-template-parsing parses the template bodies prior
to instantiation.
Basically, this is not feasible.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160112/93e3b373/attachment.html>
More information about the llvm-bugs
mailing list