diff options
author | Krasimir Georgiev <krasimir@google.com> | 2017-04-21 14:35:20 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2017-04-21 14:35:20 +0000 |
commit | bcda54b69d4b6abe75c4c18f155433bfee216d72 (patch) | |
tree | 0abb4eb7e03f4f26234516d45b715a70711896ec /clang/lib/Format/UnwrappedLineFormatter.h | |
parent | d631b9e500e1cdfba439ea1b05ffbf2f44a11e1b (diff) | |
download | bcm5719-llvm-bcda54b69d4b6abe75c4c18f155433bfee216d72.tar.gz bcm5719-llvm-bcda54b69d4b6abe75c4c18f155433bfee216d72.zip |
[clang-format] Replace IncompleteFormat by a struct with Line
Summary: This patch replaces the boolean IncompleteFormat that is used to notify the client if an unrecoverable syntax error occurred by a struct that also contains a line number.
Reviewers: djasper
Reviewed By: djasper
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D32298
llvm-svn: 300985
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.h')
-rw-r--r-- | clang/lib/Format/UnwrappedLineFormatter.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.h b/clang/lib/Format/UnwrappedLineFormatter.h index 93247f71d6e..55f0d1cac68 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.h +++ b/clang/lib/Format/UnwrappedLineFormatter.h @@ -32,9 +32,11 @@ public: WhitespaceManager *Whitespaces, const FormatStyle &Style, const AdditionalKeywords &Keywords, - bool *IncompleteFormat) + const SourceManager &SourceMgr, + FormattingAttemptStatus *Status) : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), - Keywords(Keywords), IncompleteFormat(IncompleteFormat) {} + Keywords(Keywords), SourceMgr(SourceMgr), + Status(Status) {} /// \brief Format the current block and return the penalty. unsigned format(const SmallVectorImpl<AnnotatedLine *> &Lines, @@ -63,7 +65,8 @@ private: WhitespaceManager *Whitespaces; const FormatStyle &Style; const AdditionalKeywords &Keywords; - bool *IncompleteFormat; + const SourceManager &SourceMgr; + FormattingAttemptStatus *Status; }; } // end namespace format } // end namespace clang |