diff options
-rw-r--r-- | lib/Format/TokenAnnotator.cpp | 2 | ||||
-rw-r--r-- | unittests/Format/FormatTest.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp index 34bccb978e..f34bc89cfb 100644 --- a/lib/Format/TokenAnnotator.cpp +++ b/lib/Format/TokenAnnotator.cpp @@ -423,6 +423,8 @@ public: default: break; } + while (CurrentToken != NULL) + next(); } LineType parseLine() { diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 5b99716fdc..f5606cb529 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -479,6 +479,8 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { verifyFormat("someFunction(anotherFunction( // Force break.\n" " parameter));"); + + verifyGoogleFormat("#endif // HEADER_GUARD"); } TEST_F(FormatTest, UnderstandsMultiLineComments) { |