rsmith added a comment.

In D67112#2401110 <https://reviews.llvm.org/D67112#2401110>, @aaronpuchert 
wrote:

> In D67112#2398577 <https://reviews.llvm.org/D67112#2398577>, @rsmith wrote:
>
>> Looks fine as far as it goes, but it looks like we're also missing a cast in 
>> function pointer initialization via function conversion:
>> [...]
>>
>>   |-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'
>
> It seems to depend on the standard, with `-std=c++17`:
>
>   |-VarDecl p 'void (*)()' cinit
>   | `-ImplicitCastExpr 'void (*)()' <NoOp>
>   |   `-ImplicitCastExpr 'void (*)() noexcept' <FunctionToPointerDecay>
>   |     `-DeclRefExpr 'void () noexcept' lvalue Function 'f' 'void () 
> noexcept'
>
> Perhaps because pre-C++17 `noexcept` is not part of the type, so we 
> essentially ignore it?

Oh, right, my bad. I forgot we still default to C++14 :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67112

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D67112: [... Aaron Puchert via Phabricator via cfe-commits
    • [PATCH] D671... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D671... Aaron Puchert via Phabricator via cfe-commits
    • [PATCH] D671... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D671... Aaron Puchert via Phabricator via cfe-commits

Reply via email to