[PATCH] D153639: [clang-tidy] Document modernize-raw-string-literal check options

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 23 08:56:12 PDT 2023


PiotrZSL created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a reviewer: njames93.
Herald added a project: All.
PiotrZSL requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Add missing documentation for DelimiterStem and ReplaceShorterLiterals
options.

Fixes #54662


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153639

Files:
  clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst


Index: clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst
+++ clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst
@@ -8,7 +8,7 @@
 
 Example:
 
-.. code-blocK:: c++
+.. code-block:: c++
 
   const char *const Quotes{"embedded \"quotes\""};
   const char *const Paragraph{"Line one.\nLine two.\nLine three.\n"};
@@ -44,3 +44,15 @@
 An escaped horizontal tab, form feed, or vertical tab prevents the string
 literal from being converted. The presence of a horizontal tab, form feed or
 vertical tab in source code is not visually obvious.
+
+.. option:: DelimiterStem
+
+  Custom delimiter to escape characters in raw string literals. It is used in
+  the following construction: ``R"stem_delimiter(contents)stem_delimiter"``.
+  The default value is `lit`.
+
+.. option:: ReplaceShorterLiterals
+
+  Controls replacing shorter non-raw string literals with longer raw string
+  literals. Setting this option to `true` enables the replacement.
+  The default value is `false` (shorter literals are not replaced).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153639.533977.patch
Type: text/x-patch
Size: 1201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230623/865351ac/attachment.bin>


More information about the cfe-commits mailing list