diff options
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 | ||||
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 34bccb978e7..f34bc89cfb9 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -423,6 +423,8 @@ public: default: break; } + while (CurrentToken != NULL) + next(); } LineType parseLine() { diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 5b99716fdca..f5606cb5290 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/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) { |

