From: Piotr Zegar Date: Fri, 23 Jun 2023 16:14:14 +0000 (+0000) Subject: [clang-tidy] Document modernize-raw-string-literal check options X-Git-Tag: upstream/17.0.6~4071 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0f6fd24dc12cf860e6b01f417badb115c7535ce;p=platform%2Fupstream%2Fllvm.git [clang-tidy] Document modernize-raw-string-literal check options Add missing documentation for DelimiterStem and ReplaceShorterLiterals options. Fixes #54662 Reviewed By: Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D153639 --- diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst index 3525d57..6d7589a 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/modernize/raw-string-literal.rst @@ -8,7 +8,7 @@ with raw string literals. 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 @@ string literals are left unchanged. 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).