[PATCH] D33440: clang-format: better handle statement macros

Francois Ferrand via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 17 04:51:49 PDT 2018


Typz marked an inline comment as done.
Typz added inline comments.


================
Comment at: lib/Format/Format.cpp:647-648
   LLVMStyle.SortUsingDeclarations = true;
+  LLVMStyle.StatementMacros.push_back("Q_UNUSED");
+  LLVMStyle.StatementMacros.push_back("QT_REQUIRE_VERSION");
 
----------------
alexfh wrote:
> What's the reason to have these in the LLVM style? The macros aren't used in LLVM code.
This is similar to the default foreach macros (foreach, Q_FOREACH and BOOST_FOREACH) : the macros are added here so that they are the default values for any style, since LLVM style is also both the default style and the base style for any style.



Repository:
  rC Clang

https://reviews.llvm.org/D33440





More information about the cfe-commits mailing list