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) {}
43 std::unique_ptr<SourceManager> VirtualSM,
44 std::unique_ptr<DiagnosticsEngine> Diagnostics,
45 const std::vector<CharSourceRange> &CharRanges)
46 : ID(ID), CharRanges(CharRanges.begin(), CharRanges.end()),
47 SM(*VirtualSM), FileMgr(std::move(FileMgr)),
48 VirtualSM(std::move(VirtualSM)), Diagnostics(std::move(Diagnostics)) {}
52 static std::unique_ptr<Environment>
70 std::unique_ptr<FileManager> FileMgr;
71 std::unique_ptr<SourceManager> VirtualSM;
72 std::unique_ptr<DiagnosticsEngine> Diagnostics;
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.
ArrayRef< FormatToken * > Tokens
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...
This class handles loading and caching of source files into memory.