summaryrefslogtreecommitdiffstats
path: root/include/clang/Rewrite
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Rewrite')
-rw-r--r--include/clang/Rewrite/FixItRewriter.h11
-rw-r--r--include/clang/Rewrite/FrontendActions.h4
2 files changed, 9 insertions, 6 deletions
diff --git a/include/clang/Rewrite/FixItRewriter.h b/include/clang/Rewrite/FixItRewriter.h
index 4ebcef0..9b2e016 100644
--- a/include/clang/Rewrite/FixItRewriter.h
+++ b/include/clang/Rewrite/FixItRewriter.h
@@ -27,13 +27,16 @@ namespace clang {
class SourceManager;
class FileEntry;
-class FixItPathRewriter {
+class FixItOptions {
public:
- virtual ~FixItPathRewriter();
+ virtual ~FixItOptions();
/// \brief This file is about to be rewritten. Return the name of the file
/// that is okay to write to.
virtual std::string RewriteFilename(const std::string &Filename) = 0;
+
+ /// \brief Whether to abort fixing a file when not all errors could be fixed.
+ bool FixWhatYouCan;
};
class FixItRewriter : public DiagnosticClient {
@@ -50,7 +53,7 @@ class FixItRewriter : public DiagnosticClient {
/// \brief Turn an input path into an output path. NULL implies overwriting
/// the original.
- FixItPathRewriter *PathRewriter;
+ FixItOptions *FixItOpts;
/// \brief The number of rewriter failures.
unsigned NumFailures;
@@ -60,7 +63,7 @@ public:
/// \brief Initialize a new fix-it rewriter.
FixItRewriter(Diagnostic &Diags, SourceManager &SourceMgr,
- const LangOptions &LangOpts, FixItPathRewriter *PathRewriter);
+ const LangOptions &LangOpts, FixItOptions *FixItOpts);
/// \brief Destroy the fix-it rewriter.
~FixItRewriter();
diff --git a/include/clang/Rewrite/FrontendActions.h b/include/clang/Rewrite/FrontendActions.h
index 2ff8d0a..2b5f88c 100644
--- a/include/clang/Rewrite/FrontendActions.h
+++ b/include/clang/Rewrite/FrontendActions.h
@@ -16,7 +16,7 @@
namespace clang {
class FixItRewriter;
-class FixItPathRewriter;
+class FixItOptions;
//===----------------------------------------------------------------------===//
// AST Consumer Actions
@@ -31,7 +31,7 @@ protected:
class FixItAction : public ASTFrontendAction {
protected:
llvm::OwningPtr<FixItRewriter> Rewriter;
- llvm::OwningPtr<FixItPathRewriter> PathRewriter;
+ llvm::OwningPtr<FixItOptions> FixItOpts;
virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
llvm::StringRef InFile);
OpenPOWER on IntegriCloud