[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)

Nathan James via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 19 23:17:35 PDT 2024


================
@@ -0,0 +1,12 @@
+.. title:: clang-tidy - modernize-use-cpp-style-comments
+
+modernize-use-cpp-style-comments
+================================
+
+Finds C-style comments and suggests to use C++ style comments `//`.
+
+
+.. code-block:: c++
+
+  memcpy(a, b, sizeof(int) * 5); /* use std::copy_n instead of memcpy */
+  // warning: use C++ style comments '//' instead of C style comments '/*...*/' [modernize-use-cpp-style-comments]
----------------
njames93 wrote:

Missing new line

https://github.com/llvm/llvm-project/pull/99713


More information about the cfe-commits mailing list