diff options
author | Daniel Jasper <djasper@google.com> | 2013-09-06 21:32:35 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-09-06 21:32:35 +0000 |
commit | 786a550b9fcc5fc2f0d7b0895ea0029877e9585c (patch) | |
tree | 833efe5d466dbde0954c1aa04217a374e6a99dd1 /clang/lib/Format | |
parent | b4b99987137211773051c6f2524eaad75797bb1d (diff) | |
download | bcm5719-llvm-786a550b9fcc5fc2f0d7b0895ea0029877e9585c.tar.gz bcm5719-llvm-786a550b9fcc5fc2f0d7b0895ea0029877e9585c.zip |
clang-format: Format typed enums with nested names.
The explicit type specified for an enum can actually have a nested name
specifier.
This fixes llvm.org/PR17125.
llvm-svn: 190208
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 521df8f0285..f70de5f6d88 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1036,7 +1036,8 @@ void UnwrappedLineParser::parseEnum() { if (FormatTok->Tok.is(tok::kw_class) || FormatTok->Tok.is(tok::kw_struct)) nextToken(); - while (FormatTok->Tok.getIdentifierInfo() || FormatTok->Tok.is(tok::colon)) { + while (FormatTok->Tok.getIdentifierInfo() || + FormatTok->isOneOf(tok::colon, tok::coloncolon)) { nextToken(); // We can have macros or attributes in between 'enum' and the enum name. if (FormatTok->Tok.is(tok::l_paren)) { |