diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h index aa49b2a..36de010 100644 --- a/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h +++ b/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h @@ -41,13 +41,14 @@ public: : First(Line.Tokens.front().Tok), Level(Line.Level), InPPDirective(Line.InPPDirective), MustBeDeclaration(Line.MustBeDeclaration), MightBeFunctionDecl(false), - StartsDefinition(false) { + Affected(false), LeadingEmptyLinesAffected(false), + ChildrenAffected(false) { assert(!Line.Tokens.empty()); // Calculate Next and Previous for all tokens. Note that we must overwrite // Next and Previous for every token, as previous formatting runs might have // left them in a different state. - First->Previous = NULL; + First->Previous = nullptr; FormatToken *Current = First; for (std::list<UnwrappedLineNode>::const_iterator I = ++Line.Tokens.begin(), E = Line.Tokens.end(); @@ -66,7 +67,7 @@ public: } } Last = Current; - Last->Next = NULL; + Last->Next = nullptr; } ~AnnotatedLine() { @@ -85,7 +86,17 @@ public: bool InPPDirective; bool MustBeDeclaration; 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; + + /// \c True if a one of this line's children intersects with an input range. + bool ChildrenAffected; private: // Disallow copying. |