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"
34 #define DEBUG_TYPE "format-formatter"
42 : ID(ID), CharRanges(Ranges.
begin(), Ranges.
end()), SM(SM) {}
45 std::unique_ptr<SourceManager> VirtualSM,
46 std::unique_ptr<DiagnosticsEngine> Diagnostics,
47 const std::vector<CharSourceRange> &CharRanges)
48 : ID(ID), CharRanges(CharRanges.
begin(), CharRanges.
end()),
49 SM(*VirtualSM), FileMgr(std::move(FileMgr)),
50 VirtualSM(std::move(VirtualSM)), Diagnostics(std::move(Diagnostics)) {}
54 static std::unique_ptr<Environment>
75 std::unique_ptr<FileManager> FileMgr;
76 std::unique_ptr<SourceManager> VirtualSM;
77 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.
The result type of a method or function.
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...
Defines the Diagnostic-related interfaces.
This class handles loading and caching of source files into memory.