Skip to content
Commit c9cb1c13 authored by Erich Keane's avatar Erich Keane
Browse files

Fix for Bug 33471: Preventing operator auto from resolving to a template operator.

As the bug report says,
struct A
{

  template<typename T> 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" is being deduced as "auto", 
which I believe is incorrect.

The 'operator auto' implementation in Clang is standards compliant, however 
there is a defect report against core (1670).

Differential Revision: https://reviews.llvm.org/D34370

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