summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r--clang/lib/Format/FormatToken.h3
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
OpenPOWER on IntegriCloud