[clang-format] [docs] [NFC] improve clarity in the QualifierAlignment warning
authormydeveloperday <mydeveloperday@gmail.com>
Sat, 2 Oct 2021 12:18:00 +0000 (13:18 +0100)
committermydeveloperday <mydeveloperday@gmail.com>
Sat, 2 Oct 2021 12:18:42 +0000 (13:18 +0100)
Improve the clarity and guidance of the warning when using code modifying option in clang-format see {D69764}

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D110801

clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h

index 7e4d158..c05fbc7 100644 (file)
@@ -3238,7 +3238,11 @@ the configuration (without a prefix: ``Auto``).
 
   .. warning:: 
 
-   ``QualifierAlignment`` COULD lead to incorrect code generation.
+   Setting ``QualifierAlignment``  to something other than `Leave`, COULD
+   lead to incorrect code formatting due to incorrect decisions made due to
+   clang-formats lack of complete semantic information.
+   As such extra care should be taken to review code changes made by the use
+   of this option.
 
   Possible values:
 
index a6fd446..df553c3 100644 (file)
@@ -1898,7 +1898,11 @@ struct FormatStyle {
 
   /// Different ways to arrange specifiers and qualifiers (e.g. const/volatile).
   /// \warning
-  ///  ``QualifierAlignment`` COULD lead to incorrect code generation.
+  ///  Setting ``QualifierAlignment``  to something other than `Leave`, COULD
+  ///  lead to incorrect code formatting due to incorrect decisions made due to
+  ///  clang-formats lack of complete semantic information.
+  ///  As such extra care should be taken to review code changes made by the use
+  ///  of this option.
   /// \endwarning
   /// \version 14
   QualifierAlignmentStyle QualifierAlignment;