[PATCH] Add support for foreach macros to clang-format

Brian Green briangreenery at gmail.com
Tue Mar 4 01:17:30 PST 2014


  Change ForEachMacros to be a regex instead of a list of strings

  Using a regex instead of a list of strings sounds like a much better idea.

  I also added another new configuration option SBPO_ControlStatementsAndForEachMacros since it seems like some people put spaces after foreach macros (like the example in bug 17242, bug 18534, and the code I normally work on), and some people don't (like the linux kernel).

http://llvm-reviews.chandlerc.com/D2919

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2919?vs=7460&id=7491#toc

Files:
  docs/ClangFormatStyleOptions.rst
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  lib/Format/FormatToken.cpp
  lib/Format/FormatToken.h
  lib/Format/TokenAnnotator.cpp
  lib/Format/TokenAnnotator.h
  lib/Format/UnwrappedLineParser.cpp
  lib/Format/UnwrappedLineParser.h
  unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2919.2.patch
Type: text/x-patch
Size: 15394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140304/f6dc8bf6/attachment.bin>


More information about the cfe-commits mailing list