czhang added a comment. In D62829#1533345 <https://reviews.llvm.org/D62829#1533345>, @lebedev.ri wrote:
> Hmm, but there already is clang's `-Wglobal-constructors`, that fires on some > of these: > https://godbolt.org/z/rSnNuu > You are sure those extra warning this check produces ontop of > `-Wglobal-constructors` are correct? > If so, maybe `-Wglobal-constructors` should be extended instead? Yes, this change is for variables with static lifetimes that are not necessarily globally scoped. The name -global-constructors would be a misnomer. In addition, this check is intended purely for header files, for reasons documented in the .rst file. Although similar, I do not believe this check would make sense as an extension to -global-constructors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62829/new/ https://reviews.llvm.org/D62829 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits