diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 186dbb7708585..5531234a6ea08 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -311,8 +311,7 @@ class Parser : public CodeCompletionHandler { SmallVector TemplateIds; void MaybeDestroyTemplateIds() { - if (!TemplateIds.empty() && - (Tok.is(tok::eof) || !PP.mightHavePendingAnnotationTokens())) + if (!TemplateIds.empty() && !PP.mightHavePendingAnnotationTokens()) DestroyTemplateIds(); } void DestroyTemplateIds();