mizvekov added a comment.

In D131351#3718725 <https://reviews.llvm.org/D131351#3718725>, @aaron.ballman 
wrote:

> However, we don't care about the type mismatch when doing a redeclaration or 
> when dropping the attribute, as in:
>
>   __attribute__((noreturn)) void my_exit(void);
>   void (*handler)(void) = my_exit; // Silently drops the attribute
>   
>   _Noreturn void my_exit(void) { // No concerns about the type mismatch on 
> redeclaration because we inherit __attribute__((noreturn))
>   }
>
> so maybe we shouldn't worry about it here.

Are you sure? If the function types don't match in C++, I would expect that to 
become a different overload, not a redeclaration, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131351

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to