[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 19 23:21:26 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]
+
----------------
PiotrZSL wrote:
missing test for example for:
```int a = /*some value */ 5;```
https://github.com/llvm/llvm-project/pull/99713
More information about the cfe-commits
mailing list