[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:34 PDT 2024


================
@@ -0,0 +1,16 @@
+// RUN: %check_clang_tidy -std=c++11 %s modernize-use-cpp-style-comments %t
+
+static auto PI = 3.14159265; /* value of pi upto 8 decimal places */
+// CHECK-MESSAGES: :[[@LINE-1]]:30: warning: use C++ style comments '//' instead of C style comments '/*...*/' [modernize-use-cpp-style-comments]
----------------
njames93 wrote:

If you are going to emit fixes in a check you must demonstrate those fixes in the test files using the `// CHECK-FIXES` directive 

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


More information about the cfe-commits mailing list