rnk added a comment.

In D60912#1472986 <https://reviews.llvm.org/D60912#1472986>, @jyu2 wrote:

> inline static int aoo = foo(); // C++17 inline variable, thus also a 
> definition


This is a `static inline` global variable, so it technically creates two 
different globals, so calling foo twice is intended behavior. I think we really 
want to look at the GVA linkage instead of trying to list all the reasons why 
something might have weak linkage. Take a look at `shouldBeInCOMDAT` in 
CodeGenModule.cpp, I think it has the logic we want.


Repository:
  rC Clang

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

https://reviews.llvm.org/D60912



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

Reply via email to