diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-02-06 09:53:34 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-02-06 09:53:34 +0000 |
commit | 11cd7cef1eb109563c480d72d0f7eedc2372a11e (patch) | |
tree | 2006edf87d1ffdc3004c74c982fd2a460435a48e /test | |
parent | 51390c5926d4d5bf1b3c8c4fc7019a25e9587e06 (diff) |
Merging r324246:
------------------------------------------------------------------------
r324246 | mzeren-vmw | 2018-02-05 16:59:00 +0100 (Mon, 05 Feb 2018) | 33 lines
[clang-format] Re-land: Fixup #include guard indents after parseFile()
Summary:
When a preprocessor indent closes after the last line of normal code we do not
correctly fixup include guard indents. For example:
#ifndef HEADER_H
#define HEADER_H
#if 1
int i;
# define A 0
#endif
#endif
incorrectly reformats to:
#ifndef HEADER_H
#define HEADER_H
#if 1
int i;
# define A 0
# endif
#endif
To resolve this issue we must fixup levels after parseFile(). Delaying
the fixup introduces a new state, so consolidate include guard search
state into an enum.
Reviewers: krasimir, klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D42035
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_60@324331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions