17 #ifndef LLVM_CLANG_LIB_FORMAT_TOKENANALYZER_H 18 #define LLVM_CLANG_LIB_FORMAT_TOKENANALYZER_H 31 #include "llvm/ADT/STLExtras.h" 32 #include "llvm/Support/Debug.h" 40 : ID(ID), CharRanges(Ranges.begin(), Ranges.end()), SM(SM),
46 std::unique_ptr<SourceManager> VirtualSM,
47 std::unique_ptr<DiagnosticsEngine> Diagnostics,
48 const std::vector<CharSourceRange> &CharRanges,
49 unsigned FirstStartColumn,
50 unsigned NextStartColumn,
51 unsigned LastStartColumn)
52 : ID(ID), CharRanges(CharRanges.begin(), CharRanges.end()),
54 FirstStartColumn(FirstStartColumn),
55 NextStartColumn(NextStartColumn),
56 LastStartColumn(LastStartColumn),
57 FileMgr(
std::move(FileMgr)),
58 VirtualSM(
std::move(VirtualSM)), Diagnostics(
std::move(Diagnostics)) {}
65 static std::unique_ptr<Environment>
68 unsigned FirstStartColumn = 0,
69 unsigned NextStartColumn = 0,
70 unsigned LastStartColumn = 0);
94 unsigned FirstStartColumn;
95 unsigned NextStartColumn;
96 unsigned LastStartColumn;
101 std::unique_ptr<FileManager> FileMgr;
102 std::unique_ptr<SourceManager> VirtualSM;
103 std::unique_ptr<DiagnosticsEngine> Diagnostics;
110 std::pair<tooling::Replacements, unsigned> process();
113 virtual std::pair<tooling::Replacements, unsigned>
118 void consumeUnwrappedLine(
const UnwrappedLine &TheLine)
override;
120 void finishRun()
override;
Defines the clang::FileManager interface and associated types.
Defines the SourceManager interface.
AffectedRangeManager class manages affected ranges in the code.
Contains functions for text encoding manipulation.
This file implements a token annotator, i.e.
Defines the Diagnostic-related interfaces.
This file contains the declaration of the UnwrappedLineParser, which turns a stream of tokens into Un...
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Dataflow Directional Tag Classes.
This class handles loading and caching of source files into memory.