Basic support for diagnostics.
Summary: Uses DiagnosticsEngine to output diagnostics.
Reviewers: djasper, klimek
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D278
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172071 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 017daf5..837b539 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -27,6 +27,9 @@
#include <vector>
namespace clang {
+
+class DiagnosticsEngine;
+
namespace format {
/// \brief A wrapper around a \c Token storing information about the
@@ -116,7 +119,8 @@
class UnwrappedLineParser {
public:
- UnwrappedLineParser(const FormatStyle &Style, FormatTokenSource &Tokens,
+ UnwrappedLineParser(clang::DiagnosticsEngine &Diag, const FormatStyle &Style,
+ FormatTokenSource &Tokens,
UnwrappedLineConsumer &Callback);
/// Returns true in case of a structural error.
@@ -161,6 +165,7 @@
FormatToken FormatTok;
bool MustBreakBeforeNextToken;
+ clang::DiagnosticsEngine &Diag;
const FormatStyle &Style;
FormatTokenSource *Tokens;
UnwrappedLineConsumer &Callback;