================
@@ -0,0 +1,40 @@
+.. title:: clang-tidy - use-cpp-style-comments
+
+readability-use-cpp-style-comments
+==================================
+
+Replace C-style comments with C++-style comments.
+C-style comments (``/* ... */``) are inherited from C, while C++ introduces 
+``//`` as a more concise, readable, and less error-prone alternative. Modern 
C++ 
+guidelines recommend using C++-style comments for consistency and 
+maintainability. This check identifies and replaces C-style comments with 
+equivalent C++-style comments.
+
+Examples:
+
+Input:
+.. code-block::c++
+
+  /* This is a single-line comment */
+  int x = 42;  /* Inline comment */
+
+  /* This is a
+  multi-line comment */
+
+Output:
+.. code-block::c++
----------------
EugeneZelenko wrote:

Ditto.

https://github.com/llvm/llvm-project/pull/124319
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to