aaron.ballman added a comment.

Can you add some details to the patch summary as to what problem you're trying 
to solve with these changes?

The idea itself has some interesting edge cases to think about:

  [[some_attr]] void decl();
  [[clone_attrs_from(decl)]] void other();
  [[some_new_attr]] void decl();
  
  int main() {
    other(); // Does other see some_new_attr as well?
  }

or

  [[hot]] void decl();
  [[clone_attrs_from(decl), cold]] void other_decl(); // Do you properly catch 
the mutual exclusions?

or

  [[some_attr_requiring_the_func_return_a_pointer]] int *decl();
  [[clone_attrs_from(decl)]] int other(); // Do you properly catch the semantic 
restrictions?

or

  struct [[some_struct_attr]] S { ... };
  [[clone_attrs_from(S)]] void other(); // Do you properly catch the semantic 
restrictions?

or

  [[some_attr]] void decl();
  [[clone_attrs_from(decl)]] void decl(); // Uh oh, recursive.

(I'm sure there are more situations I'm missing, but you get the idea about 
needing to be very careful with the edge cases.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128249

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

Reply via email to