[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 01:08:41 PDT 2022


whisperity added a comment.

After adding improvements to the documentation, I think this will be good to go, and thank you! Perhaps just for a safety measure you could run it on a few projects (LLVM itself?) to ensure we didn't miss a case where it might magically crash, but I wonder how many specifically "C++14" projects will use signal handlers in the first place.



================
Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:328
     const LangOptions &LangOpts) const {
-  // FIXME: Make the checker useful on C++ code.
-  if (LangOpts.CPlusPlus)
-    return false;
-
-  return true;
+  return LangOpts.CPlusPlus17 == 0;
 }
----------------
Aren't these `bool`s?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118996



More information about the cfe-commits mailing list