diff options
author | Alexander Kornienko <alexfh@google.com> | 2012-12-04 17:27:50 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2012-12-04 17:27:50 +0000 |
commit | cff563c0123bbb8d959c93ed371d27cbc6bc4a29 (patch) | |
tree | 9aacc432b98df1f22275726c196a421a78fa4216 /lib/Format/UnwrappedLineParser.h | |
parent | ff685c562c8fd5dfc6effec17377fde9dad6f271 (diff) |
Error recovery part 2
Summary: Adds recovery for structural errors in clang-format.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, silvas
Differential Revision: http://llvm-reviews.chandlerc.com/D164
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.h')
-rw-r--r-- | lib/Format/UnwrappedLineParser.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h index 3bde7819d6..63f3659706 100644 --- a/lib/Format/UnwrappedLineParser.h +++ b/lib/Format/UnwrappedLineParser.h @@ -79,11 +79,12 @@ public: UnwrappedLineParser(Lexer &Lex, SourceManager &SourceMgr, UnwrappedLineConsumer &Callback); - void parse(); + /// Returns true in case of a structural error. + bool parse(); private: - void parseLevel(); - void parseBlock(); + bool parseLevel(); + bool parseBlock(); void parsePPDirective(); void parseComment(); void parseStatement(); |