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.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h
index 950938395e5..6006ec87c03 100644
--- a/clang/lib/Format/FormatToken.h
+++ b/clang/lib/Format/FormatToken.h
@@ -80,14 +80,14 @@ class TokenRole;
/// whitespace characters preceeding it.
struct FormatToken {
FormatToken()
- : NewlinesBefore(0), HasUnescapedNewline(false), LastNewlineOffset(0),
- CodePointCount(0), IsFirst(false), MustBreakBefore(false),
- IsUnterminatedLiteral(false), BlockKind(BK_Unknown), Type(TT_Unknown),
- SpacesRequiredBefore(0), CanBreakBefore(false),
- ClosesTemplateDeclaration(false), ParameterCount(0),
- PackingKind(PPK_Inconclusive), TotalLength(0), UnbreakableTailLength(0),
- BindingStrength(0), SplitPenalty(0), LongestObjCSelectorName(0),
- FakeRParens(0), LastInChainOfCalls(false),
+ : NewlinesBefore(0), HasUnescapedNewline(false), IsMultiline(false),
+ LastNewlineOffset(0), CodePointCount(0), IsFirst(false),
+ MustBreakBefore(false), IsUnterminatedLiteral(false),
+ BlockKind(BK_Unknown), Type(TT_Unknown), SpacesRequiredBefore(0),
+ CanBreakBefore(false), ClosesTemplateDeclaration(false),
+ ParameterCount(0), PackingKind(PPK_Inconclusive), TotalLength(0),
+ UnbreakableTailLength(0), BindingStrength(0), SplitPenalty(0),
+ LongestObjCSelectorName(0), FakeRParens(0), LastInChainOfCalls(false),
PartOfMultiVariableDeclStmt(false), MatchingParen(NULL), Previous(NULL),
Next(NULL) {}
@@ -104,6 +104,9 @@ struct FormatToken {
/// Token.
bool HasUnescapedNewline;
+ /// \brief Whether the token text contains newlines (escaped or not).
+ bool IsMultiline;
+
/// \brief The range of the whitespace immediately preceeding the \c Token.
SourceRange WhitespaceRange;
OpenPOWER on IntegriCloud