lebedev.ri added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp:47 +void DynamicStaticInitializersCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus || getLangOpts().ThreadsafeStatics) + return; ---------------- czhang wrote: > aaron.ballman wrote: > > Why is this check disabled for C++? I would expect dynamic init of a static > > in a C++ header file would be flagged by this check. > I'm confused now. If the language is not C++, we do an early return; that is, > the check is run if we are on C++. Perhaps the early return is too confusing? Then the question is opposite, is this meaningless for C? 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