alexfh added a comment. In D58612#1409024 <https://reviews.llvm.org/D58612#1409024>, @riccibruno wrote:
> In D58612#1408991 <https://reviews.llvm.org/D58612#1408991>, @alexfh wrote: > > > In D58612#1408942 <https://reviews.llvm.org/D58612#1408942>, @riccibruno > > wrote: > > > > > Okay, but what about the other similar uses of static members which have > > > the same problem ? > > > > > > Do you have any example in mind? I've only seen TSan warnings for these > > counters, nothing else so far. > > > For example in `DeclBase.cpp` > > #define DECL(DERIVED, BASE) static int n##DERIVED##s = 0; > #define ABSTRACT_DECL(DECL) > #include "clang/AST/DeclNodes.inc" > > > which count the number of declaration node of each kind. In D58612#1409024 <https://reviews.llvm.org/D58612#1409024>, @riccibruno wrote: > In D58612#1408991 <https://reviews.llvm.org/D58612#1408991>, @alexfh wrote: > > > In D58612#1408942 <https://reviews.llvm.org/D58612#1408942>, @riccibruno > > wrote: > > > > > Okay, but what about the other similar uses of static members which have > > > the same problem ? > > > > > > Do you have any example in mind? I've only seen TSan warnings for these > > counters, nothing else so far. > > > For example in `DeclBase.cpp` > > #define DECL(DERIVED, BASE) static int n##DERIVED##s = 0; > #define ABSTRACT_DECL(DECL) > #include "clang/AST/DeclNodes.inc" > > > which count the number of declaration node of each kind. These are probably easier to convert to std::atomic<int>, but I'd do this separately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58612/new/ https://reviews.llvm.org/D58612 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits