sunfish added a comment.

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

> > Removes errnoneous use of diag::err_alias_is_definition, which turned out 
> > to be ineffective anyway since functions can be defined later in the 
> > translation unit and avoid detection.
>
> If you need to keep the prohibition that these attributes not be applied to 
> functions with definitions, there are ways to accomplish that (we merge 
> declarations and can decide what to do at that point if we see a declaration 
> that is a definition). Given that, do you still want to lift this restriction?


These attributes don't make sense on definitions. So right now, they are 
silently ignored when applied to definitions. That's effectively the current 
behavior too, because the existing check doesn't work as intended, so the 
change here doesn't change anything in practice yet.

A diagnostic would be slightly tidier, but I'm not familiar enough with clang 
to do this quickly and didn't want to delay the rest of the patch while I 
investigated. Do you know the specific places we'd need to change to diagnose 
this?


Repository:
  rC Clang

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

https://reviews.llvm.org/D59520



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

Reply via email to