[PATCH] D67112: [Sema] Introduce function reference conversion, NFC

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 18:37:40 PST 2020


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Looks fine as far as it goes, but it looks like we're also missing a cast in function pointer initialization via function conversion:

  void f() noexcept;
  void (*p)() = f; 

results in

  |-VarDecl 0x105143e8 <line:2:1, col:15> col:8 p 'void (*)()' cinit
  | `-ImplicitCastExpr 0x10514498 <col:15> 'void (*)() noexcept' <FunctionToPointerDecay>
  |   `-DeclRefExpr 0x10514450 <col:15> 'void () noexcept' lvalue Function 0x10514240 'f' 'void () noexcept'


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67112/new/

https://reviews.llvm.org/D67112



More information about the cfe-commits mailing list