Fix formatting regression introduced by r174307.

In preprocessor definitions, we would not parse all the tokens and thus
not annotate them anymore. This led to a wrong formatting of comments
in google style:

  #endif // HEADER_GUARD  -- requires two spaces

llvm-svn: 174361
This commit is contained in:
Daniel Jasper 2013-02-05 09:34:14 +00:00
parent 428a06cc75
commit a885dbeb96
2 changed files with 4 additions and 0 deletions

View File

@ -423,6 +423,8 @@ public:
default:
break;
}
while (CurrentToken != NULL)
next();
}
LineType parseLine() {

View File

@ -479,6 +479,8 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) {
verifyFormat("someFunction(anotherFunction( // Force break.\n"
" parameter));");
verifyGoogleFormat("#endif // HEADER_GUARD");
}
TEST_F(FormatTest, UnderstandsMultiLineComments) {