aaron.ballman added a comment.

Aside from a few small nits, this looks reasonable. Have you run it over any 
large code bases that use signals to test the quality of the check?



================
Comment at: docs/clang-tidy/checks/cert-msc54-cpp.rst:23
+    extern "C" void cpp_signal_handler(int sig) {
+      // warning: do not use C++ representations in signal handlers
+      throw "error message";
----------------
The warning text should match the actual warning.


================
Comment at: 
test/clang-tidy/cert-signal-handler-must-be-plain-old-function.cpp:56-57
+  // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: do not call functions with C++ 
constructs in signal handlers [cert-msc54-cpp]
+  // CHECK-MESSAGES: :[[@LINE-11]]:3: note: function called here
+  // CHECK-MESSAGES: :[[@LINE-23]]:3: note: C++ construct used here
+  recursive_function();
----------------
Can you move these to be closer to where the actual note appears? It makes it 
easier to ensure that the diagnostic appears on the proper line.


Repository:
  rL LLVM

https://reviews.llvm.org/D33825



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

Reply via email to