diff options
author | Daniel Jasper <djasper@google.com> | 2013-08-20 12:42:50 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-08-20 12:42:50 +0000 |
commit | 2b41a82e61977479bd0cb98706030e652c76e3a6 (patch) | |
tree | e3a99af84d382e6cf8c1bd379be7d1e803d9201f /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | b55acad91c37bf70455e8ff1803fc1a0b10ad859 (diff) | |
download | bcm5719-llvm-2b41a82e61977479bd0cb98706030e652c76e3a6.tar.gz bcm5719-llvm-2b41a82e61977479bd0cb98706030e652c76e3a6.zip |
clang-format: Format enum struct/class like enum.
Patch by Joe Hermaszewski. Thank you!
llvm-svn: 188794
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 56fe81f3f2b..d77f931b718 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -918,6 +918,10 @@ void UnwrappedLineParser::parseAccessSpecifier() { void UnwrappedLineParser::parseEnum() { nextToken(); + // Eat up enum class ... + if (FormatTok->Tok.is(tok::kw_class) || + FormatTok->Tok.is(tok::kw_struct)) + nextToken(); if (FormatTok->Tok.is(tok::identifier) || FormatTok->Tok.is(tok::kw___attribute) || FormatTok->Tok.is(tok::kw___declspec)) { |