[PATCH] D35955: clang-format: Add preprocessor directive indentation
Erik Uhlmann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 16 16:36:41 PDT 2017
euhlmann updated this revision to Diff 111433.
euhlmann marked 13 inline comments as done.
euhlmann edited the summary of this revision.
euhlmann added a comment.
Allows comments before the include guard opens. However, if there's a single non-comment line before an include-guard-like structure that meets all the other conditions then it will be treated as an include guard because `Lines` does not yet contain the line before the `#ifndef`. This looks difficult to fix and I believe it's a rare enough situation to ignore.
This does not yet address avoiding repetition in the tests or comments before indented preprocessor lines being indented.
https://reviews.llvm.org/D35955
Files:
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineFormatter.cpp
lib/Format/UnwrappedLineParser.cpp
lib/Format/UnwrappedLineParser.h
unittests/Format/FormatTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35955.111433.patch
Type: text/x-patch
Size: 18060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170816/859a94c9/attachment-0001.bin>
More information about the cfe-commits
mailing list