Not sure if this has any effect, but it was inconsistent before.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Maybe this is to trivial for a review. The comment on StandardConversionSequence::Third in clang/Sema/Overload.h says
The third conversion can be a qualification conversion or a function conversion.
There may be a deeper issue here in that there are four standard conversion sequences, not three: http://eel.is/c++draft/conv#1, but otherwise this change seems correct to me (function conversion is certainly not in the first group).
Do you have a test case which can exercise this change?
It seems we've collapsed the third and fourth kind into one, I wonder if that makes a difference. This can even be observed in the AST:
void f() noexcept; void (*const fp)() = f; // VarDecl fp 'void (*const)()' cinit // (2) `-ImplicitCastExpr 'void (*const)()' <NoOp> // (1) `-ImplicitCastExpr 'void (*)() noexcept' <FunctionToPointerDecay> // `-DeclRefExpr 'void () noexcept' lvalue Function 'f' 'void () noexcept'
where (1) is a first kind conversion, and (2) a combined third and fourth kind conversion. Since both are essentially no-ops (see also D67112), it probably doesn't make sense to go into more detail.
Do you have a test case which can exercise this change?
Nope, just discovered this while reading the code. This should be unreachable, so it would be bad if I could observe a change.