]> granicus.if.org Git - clang/commit
clang-format: Add special comments to disable formatting.
authorDaniel Jasper <djasper@google.com>
Wed, 6 Aug 2014 13:40:26 +0000 (13:40 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 6 Aug 2014 13:40:26 +0000 (13:40 +0000)
commit71e0694b6af00196cc91ad44e602ad34d27554c3
treecec8f0e9851a1968d95c2b18f93112f0350ad5fa
parent5b7401235ec2cb54577367b46dc7974e44b76761
clang-format: Add special comments to disable formatting.

With this patch:
  int ThisWillBeFormatted;
  // clang-format off
  int   ThisWontBeFormatted;
  // clang-format on
  int Formatted;

This is for regions where a significantly nicer code layout can be found
knowing the content of the code.

This fixes llvm.org/PR20463.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214966 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp