diff options
author | Alexander Kornienko <alexfh@google.com> | 2012-12-06 18:03:27 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2012-12-06 18:03:27 +0000 |
commit | 578fdd8968503056dc4bd8d7664281cd3e3595e0 (patch) | |
tree | 3e09b82e7993485e0ff9500b0f4907123412b056 /clang/lib/Format/UnwrappedLineParser.h | |
parent | a14523f11c4634ad9b1ee780dd4600f82f1814e9 (diff) | |
download | bcm5719-llvm-578fdd8968503056dc4bd8d7664281cd3e3595e0.tar.gz bcm5719-llvm-578fdd8968503056dc4bd8d7664281cd3e3595e0.zip |
Clang-format: IndentCaseLabels option, proper namespace handling
Summary: + tests arranged in groups, as their number is already quite large.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D185
llvm-svn: 169520
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.h')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h index 3fbc73fd75b..03dda9957da 100644 --- a/clang/lib/Format/UnwrappedLineParser.h +++ b/clang/lib/Format/UnwrappedLineParser.h @@ -21,6 +21,7 @@ #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceManager.h" +#include "clang/Format/Format.h" #include "clang/Lex/Lexer.h" namespace clang { @@ -78,7 +79,8 @@ public: class UnwrappedLineParser { public: - UnwrappedLineParser(Lexer &Lex, SourceManager &SourceMgr, + UnwrappedLineParser(const FormatStyle &Style, Lexer &Lex, + SourceManager &SourceMgr, UnwrappedLineConsumer &Callback); /// Returns true in case of a structural error. @@ -86,7 +88,7 @@ public: private: bool parseLevel(); - bool parseBlock(); + bool parseBlock(unsigned AddLevels = 1); void parsePPDirective(); void parseComment(); void parseStatement(); @@ -97,6 +99,7 @@ private: void parseLabel(); void parseCaseLabel(); void parseSwitch(); + void parseNamespace(); void parseAccessSpecifier(); void parseEnum(); void addUnwrappedLine(); @@ -111,6 +114,7 @@ private: FormatToken FormatTok; bool GreaterStashed; + const FormatStyle &Style; Lexer &Lex; SourceManager &SourceMgr; IdentifierTable IdentTable; |