9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_INCLUDEINSERTER_H
13#include "clang/Basic/Diagnostic.h"
14#include "llvm/ADT/StringSet.h"
20namespace tidy::utils {
63 bool SelfContainedDiags);
75 llvm::StringRef Header);
82 std::optional<FixItHint>
89 SourceLocation HashLocation, SourceLocation EndLocation);
93 llvm::DenseMap<FileID, std::unique_ptr<IncludeSorter>> IncludeSorterByFile;
94 llvm::DenseMap<FileID, llvm::StringSet<>> InsertedHeaders;
95 const SourceManager *SourceMgr{
nullptr};
97 const bool SelfContainedDiags;
bool IsAngled
true if this was an include with angle brackets
Produces fixes to insert specified includes to source files, if not yet present.
void registerPreprocessor(Preprocessor *PP)
Registers this with the Preprocessor PP, must be called before this class is used.
std::optional< FixItHint > createIncludeInsertion(FileID FileID, llvm::StringRef Header)
Creates a Header inclusion directive fixit in the File FileID.
IncludeSorter::IncludeStyle getStyle() const
std::optional< FixItHint > createMainFileIncludeInsertion(llvm::StringRef Header)
Creates a Header inclusion directive fixit in the main file.
Class used by IncludeInserterCallback to record the names of the inclusions in a given source file be...
IncludeStyle
Supported include styles.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//