diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.h')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h index 0a0699d2187..dc936e48b5c 100644 --- a/clang/lib/Format/TokenAnnotator.h +++ b/clang/lib/Format/TokenAnnotator.h @@ -71,7 +71,8 @@ public: CanBreakBefore(false), MustBreakBefore(false), ClosesTemplateDeclaration(false), MatchingParen(NULL), ParameterCount(1), BindingStrength(0), SplitPenalty(0), - LongestObjCSelectorName(0), Parent(NULL) { + LongestObjCSelectorName(0), Parent(NULL), FakeLParens(0), + FakeRParens(0) { } bool is(tok::TokenKind Kind) const { return FormatTok.Tok.is(Kind); } @@ -118,6 +119,11 @@ public: std::vector<AnnotatedToken> Children; AnnotatedToken *Parent; + /// \brief Insert this many fake ( before this token for correct indentation. + unsigned FakeLParens; + /// \brief Insert this many fake ) before this token for correct indentation. + unsigned FakeRParens; + const AnnotatedToken *getPreviousNoneComment() const { AnnotatedToken *Tok = Parent; while (Tok != NULL && Tok->is(tok::comment)) |

