diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.h')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.h b/clang/lib/Format/TokenAnnotator.h index aa49b2a5c07..8bdf758bc1b 100644 --- a/clang/lib/Format/TokenAnnotator.h +++ b/clang/lib/Format/TokenAnnotator.h @@ -41,7 +41,8 @@ public: : First(Line.Tokens.front().Tok), Level(Line.Level), InPPDirective(Line.InPPDirective), MustBeDeclaration(Line.MustBeDeclaration), MightBeFunctionDecl(false), - StartsDefinition(false) { + StartsDefinition(false), Affected(false), + LeadingEmptyLinesAffected(false) { assert(!Line.Tokens.empty()); // Calculate Next and Previous for all tokens. Note that we must overwrite @@ -87,6 +88,14 @@ public: bool MightBeFunctionDecl; bool StartsDefinition; + /// \c True if this line should be formatted, i.e. intersects directly or + /// indirectly with one of the input ranges. + bool Affected; + + /// \c True if the leading empty lines of this line intersect with one of the + /// input ranges. + bool LeadingEmptyLinesAffected; + private: // Disallow copying. AnnotatedLine(const AnnotatedLine &) LLVM_DELETED_FUNCTION; |