Skip to content
Commit 578a1f8c authored by John McCall's avatar John McCall
Browse files

If a non-template constructor instantiated to X(X),

ignore it during overload resolution when initializing
X from a value of type cv X.

Previously, our rule here only ignored specializations
of constructor templates.  That's probably because the
standard says that constructors are outright ill-formed
if their first parameter is literally X and they're
callable with one argument.  However, Clang only
enforces that prohibition against non-implicit
instantiations; I'm not sure why, but it seems to be
deliberate.  Given that, the most sensible thing to
do is to just ignore the "illegal" constructor
regardless of where it came from.

Also, stop ignoring such constructors silently:
print a note explaining why they're being ignored.

Fixes <rdar://19199836>.

llvm-svn: 224205
parent 706f315e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment