[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-05 Thread Mark Zeren via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324238: [clang-format] Fixup #include guard indents after parseFile() (authored by mzeren-vmw, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Thank you! Comment at: lib/Format/UnwrappedLineParser.cpp:244 PPBranchLevel = -1; - IfNdefCondition = nullptr; - FoundIncludeGuardStart = false; - Inclu

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-01 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw updated this revision to Diff 132394. mzeren-vmw added a comment. - Add comments to IncludeGuardState. - Fix re-initialization of IncludeGuard in UnwrappedLineParser::reset. - Remove unnecessary block after if. - Rebase Repository: rC Clang https://reviews.llvm.org/D42035 Files:

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-01 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:244 PPBranchLevel = -1; - IfNdefCondition = nullptr; - FoundIncludeGuardStart = false; - IncludeGuardRejected = false; + IncludeGuard = IG_Inited; + IncludeGuardToken = nullptr; -

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good! Just some comments for the include guard states would be helpful. Comment at: lib/Format/UnwrappedLineParser.h:259 +IG_Rejected, + }; + Please put a short comment explaining each of these states. Repository: rC Cla

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-01-31 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw updated this revision to Diff 132320. mzeren-vmw added a comment. rebase, ping. Repository: rC Clang https://reviews.llvm.org/D42035 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-01-14 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw created this revision. mzeren-vmw added reviewers: euhlmann, krasimir, klimek. Herald added a subscriber: cfe-commits. 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_