[PATCH] D75229: [clang-tidy] Add signal-in-multithreaded-program check

Kocsis Ábel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 16 02:18:28 PST 2020


abelkocsis added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/SignalInMultithreadedProgramCheck.cpp:68
+    const SourceManager &SM, Preprocessor *pp, Preprocessor *ModuleExpanderPP) {
+  PP = pp;
+}
----------------
whisperity wrote:
> Global state is always a potential problem. Are you sure this is the right way to do things? Most other tidy checks that actively use this function define their own `PPCallback` subclass and use the existing preprocessor here to ensure the preprocessor executes the callback.
I've used the same way in another check (https://reviews.llvm.org/D69181). I'm not entirely sure which is the better way to do.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D75229



More information about the cfe-commits mailing list