This is an archive of the discontinued LLVM Phabricator instance.

Sema: Create a no-op implicit cast for lvalue function conversions.
ClosedPublic

Authored by pcc on Aug 19 2019, 2:01 PM.

Details

Summary

This fixes an assertion failure in the case where an implicit conversion for a
function call involves an lvalue function conversion, and makes the AST for
initializations involving implicit lvalue function conversions more accurate.

Diff Detail

Event Timeline

pcc created this revision.Aug 19 2019, 2:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2019, 2:01 PM
rsmith accepted this revision.Oct 18 2019, 5:19 PM
This revision is now accepted and ready to land.Oct 18 2019, 5:19 PM
This revision was automatically updated to reflect the committed changes.
aaronpuchert added inline comments.
clang/lib/Sema/SemaInit.cpp
4745

Is this a qualification conversion though? The standard lists it "function pointer conversion".

clang/test/CodeGenCXX/implicit-function-conversion.cpp
6–7

Wouldn't it make slightly more sense to check the AST for a specific ImplicitCastExpr? This test would have passed before your change when assertions are turned off, if I'm not mistaken.