diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -3238,7 +3238,11 @@ .. 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: diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -1898,7 +1898,11 @@ /// 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;