steakhal added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/misc/BadSignalToKillThreadCheck.cpp:28
+
+static Preprocessor *PP;
+
----------------
Can't we place this `PP` variable to the checker class?
Like the [[ 
https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h#L39
 | modernize/UseTrailingReturnTypeCheck ]] does?


================
Comment at: clang-tools-extra/clang-tidy/misc/BadSignalToKillThreadCheck.cpp:35
+  const auto TryExpandAsInteger =
+      [PP = PP](Preprocessor::macro_iterator It) -> Optional<unsigned> {
+    if (It == PP->macro_end())
----------------
aaron.ballman wrote:
> This lambda capture looks suspicious -- why do you need to initialize the 
> capture?
You are right, I forgot that `PP` is a global variable when I offered this 
solution.
Global variables should not be captured, so empty capture is good enough.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D69181



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

Reply via email to