#include "clang/Rewrite/Frontend/FixItRewriter.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Edit/Commit.h"
#include "clang/Edit/EditsReceiver.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "llvm/ADT/RewriteBuffer.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdio>
#include <memory>
#include <string>
#include <system_error>
#include <utility>
usingnamespaceclang;
RewriteBuffer;
FixItRewriter::FixItRewriter(DiagnosticsEngine &Diags, SourceManager &SourceMgr,
const LangOptions &LangOpts,
FixItOptions *FixItOpts)
: … { … }
FixItRewriter::~FixItRewriter() { … }
bool FixItRewriter::WriteFixedFile(FileID ID, raw_ostream &OS) { … }
namespace {
class RewritesReceiver : public edit::EditsReceiver { … };
}
bool FixItRewriter::WriteFixedFiles(
std::vector<std::pair<std::string, std::string>> *RewrittenFiles) { … }
bool FixItRewriter::IncludeInDiagnosticCounts() const { … }
void FixItRewriter::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
const Diagnostic &Info) { … }
void FixItRewriter::Diag(SourceLocation Loc, unsigned DiagID) { … }
FixItOptions::~FixItOptions() = default;