diff options
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r-- | clang/lib/Format/FormatToken.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h index 528cab78cc0..38f157776f3 100644 --- a/clang/lib/Format/FormatToken.h +++ b/clang/lib/Format/FormatToken.h @@ -350,7 +350,8 @@ struct FormatToken { } bool isTrailingComment() const { - return is(tok::comment) && (!Next || Next->NewlinesBefore > 0); + return is(tok::comment) && + (Type == TT_LineComment || !Next || Next->NewlinesBefore > 0); } /// \brief Returns \c true if this is a keyword that can be used |