diff --git a/clang/docs/ClangFormatStyleOptions.rst b/clang/docs/ClangFormatStyleOptions.rst --- a/clang/docs/ClangFormatStyleOptions.rst +++ b/clang/docs/ClangFormatStyleOptions.rst @@ -2694,8 +2694,11 @@ Use tabs whenever we need to fill whitespace that spans at least from one tab stop to the next one. + + **WhitespaceSensitiveMacros** (``std::vector``) - A vector of macros which are whitespace-sensitive and should not be touched. + A vector of macros which are whitespace-sensitive and should not + be touched. These are expected to be macros of the form: @@ -2709,9 +2712,7 @@ WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE'] - For example: BOOST_PP_STRINGIZE. - - + For example: BOOST_PP_STRINGIZE .. END_FORMAT_STYLE_OPTIONS 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 @@ -1425,15 +1425,20 @@ /// For example: TESTSUITE std::vector NamespaceMacros; - /// A vector of macros which are whitespace-sensitive and shouldn't be - /// touched. + /// A vector of macros which are whitespace-sensitive and should not + /// be touched. /// /// These are expected to be macros of the form: /// \code /// STRINGIZE(...) /// \endcode /// - /// For example: STRINGIZE + /// In the .clang-format configuration file, this can be configured like: + /// \code{.yaml} + /// WhitespaceSensitiveMacros: ['STRINGIZE', 'PP_STRINGIZE'] + /// \endcode + /// + /// For example: BOOST_PP_STRINGIZE std::vector WhitespaceSensitiveMacros; tooling::IncludeStyle IncludeStyle;