summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-09-05 15:34:55 +0000
committerManuel Klimek <klimek@google.com>2013-09-05 15:34:55 +0000
commit9a53c7f40d02a4d10411aae6e161a25a39512e72 (patch)
tree325a6e732f0b46b13fa7cf180e89dde7d4a32fde /clang/lib/Format/UnwrappedLineParser.cpp
parent8d519fe0156cdb13299106177c211b788727a0d2 (diff)
downloadbcm5719-llvm-9a53c7f40d02a4d10411aae6e161a25a39512e72.tar.gz
bcm5719-llvm-9a53c7f40d02a4d10411aae6e161a25a39512e72.zip
Fixes PR 17106 (explicitly typed enums are formatted differently).
Before: enum X : int { A, B, C }; After: enum X : int { A, B, C }; llvm-svn: 190054
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index 5029bd689bc..766e1d8d922 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -1035,9 +1035,7 @@ void UnwrappedLineParser::parseEnum() {
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)) {
+ while (FormatTok->Tok.getIdentifierInfo() || FormatTok->Tok.is(tok::colon)) {
nextToken();
// We can have macros or attributes in between 'enum' and the enum name.
if (FormatTok->Tok.is(tok::l_paren)) {
OpenPOWER on IntegriCloud