clang-tools
10.0.0git
|
Produces fixes to insert specified includes to source files, if not yet present. More...
#include <IncludeInserter.h>
Public Member Functions | |
IncludeInserter (const SourceManager &SourceMgr, const LangOptions &LangOpts, IncludeSorter::IncludeStyle Style) | |
~IncludeInserter () | |
std::unique_ptr< PPCallbacks > | CreatePPCallbacks () |
Create PPCallbacks for registration with the compiler's preprocessor. More... | |
llvm::Optional< FixItHint > | CreateIncludeInsertion (FileID FileID, llvm::StringRef Header, bool IsAngled) |
Creates a Header inclusion directive fixit. More... | |
Friends | |
class | IncludeInserterCallback |
Produces fixes to insert specified includes to source files, if not yet present.
IncludeInserter
can be used in clang-tidy checks in the following way:
Definition at line 56 of file IncludeInserter.h.
clang::tidy::utils::IncludeInserter::IncludeInserter | ( | const SourceManager & | SourceMgr, |
const LangOptions & | LangOpts, | ||
IncludeSorter::IncludeStyle | Style | ||
) |
Definition at line 37 of file IncludeInserter.cpp.
clang::tidy::utils::IncludeInserter::~IncludeInserter | ( | ) |
Definition at line 42 of file IncludeInserter.cpp.
llvm::Optional< FixItHint > clang::tidy::utils::IncludeInserter::CreateIncludeInsertion | ( | FileID | FileID, |
llvm::StringRef | Header, | ||
bool | IsAngled | ||
) |
Creates a Header
inclusion directive fixit.
Returns llvm::None
on error or if inclusion directive already exists.
Definition at line 49 of file IncludeInserter.cpp.
std::unique_ptr< PPCallbacks > clang::tidy::utils::IncludeInserter::CreatePPCallbacks | ( | ) |
Create PPCallbacks
for registration with the compiler's preprocessor.
Definition at line 44 of file IncludeInserter.cpp.
|
friend |
Definition at line 79 of file IncludeInserter.h.