aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Rewrite/FixItRewriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Rewrite/FixItRewriter.h')
-rw-r--r--include/clang/Rewrite/FixItRewriter.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/clang/Rewrite/FixItRewriter.h b/include/clang/Rewrite/FixItRewriter.h
index bab99624ba4a..bf7e7911c977 100644
--- a/include/clang/Rewrite/FixItRewriter.h
+++ b/include/clang/Rewrite/FixItRewriter.h
@@ -19,8 +19,6 @@
#include "clang/Basic/SourceLocation.h"
#include "clang/Rewrite/Rewriter.h"
-namespace llvm { class raw_ostream; }
-
namespace clang {
class SourceManager;
@@ -38,9 +36,9 @@ public:
bool FixWhatYouCan;
};
-class FixItRewriter : public DiagnosticClient {
+class FixItRewriter : public DiagnosticConsumer {
/// \brief The diagnostics machinery.
- Diagnostic &Diags;
+ DiagnosticsEngine &Diags;
/// \brief The rewriter used to perform the various code
/// modifications.
@@ -48,7 +46,7 @@ class FixItRewriter : public DiagnosticClient {
/// \brief The diagnostic client that performs the actual formatting
/// of error messages.
- DiagnosticClient *Client;
+ DiagnosticConsumer *Client;
/// \brief Turn an input path into an output path. NULL implies overwriting
/// the original.
@@ -61,7 +59,7 @@ public:
typedef Rewriter::buffer_iterator iterator;
/// \brief Initialize a new fix-it rewriter.
- FixItRewriter(Diagnostic &Diags, SourceManager &SourceMgr,
+ FixItRewriter(DiagnosticsEngine &Diags, SourceManager &SourceMgr,
const LangOptions &LangOpts, FixItOptions *FixItOpts);
/// \brief Destroy the fix-it rewriter.
@@ -79,7 +77,7 @@ public:
/// \brief Write a single modified source file.
///
/// \returns true if there was an error, false otherwise.
- bool WriteFixedFile(FileID ID, llvm::raw_ostream &OS);
+ bool WriteFixedFile(FileID ID, raw_ostream &OS);
/// \brief Write the modified source files.
///
@@ -88,17 +86,19 @@ public:
/// IncludeInDiagnosticCounts - This method (whose default implementation
/// returns true) indicates whether the diagnostics handled by this
- /// DiagnosticClient should be included in the number of diagnostics
- /// reported by Diagnostic.
+ /// DiagnosticConsumer should be included in the number of diagnostics
+ /// reported by DiagnosticsEngine.
virtual bool IncludeInDiagnosticCounts() const;
/// HandleDiagnostic - Handle this diagnostic, reporting it to the user or
/// capturing it to a log as needed.
- virtual void HandleDiagnostic(Diagnostic::Level DiagLevel,
- const DiagnosticInfo &Info);
+ virtual void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
+ const Diagnostic &Info);
/// \brief Emit a diagnostic via the adapted diagnostic client.
void Diag(SourceLocation Loc, unsigned DiagID);
+
+ DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const;
};
}