[Sema] Teach CheckPlaceholderExpr about unaddressable functions.
Given the following C++: ``` void foo(); void foo() __attribute__((enable_if(false, ""))); bool bar() { auto P = foo; return P == foo; } ``` We'll currently happily (and correctly) resolve `foo` to the `foo` overload without `enable_if` when assigning to `P`. However, we'll complain about an ambiguous overload on the `P == foo` line, because `Sema::CheckPlaceholderExpr` doesn't recognize that there's only one `foo` that could possibly work here. This patch teaches `Sema::CheckPlaceholderExpr` how to properly deal with such cases. Grepping for other callers of things like `Sema::ResolveAndFixSingleFunctionTemplateSpecialization`, it *looks* like this is the last place that needed to be fixed up. If I'm wrong, I'll see if there's something we can do that beats what amounts to whack-a-mole with bugs. llvm-svn: 272080
Loading
Please register or sign in to comment