clang-tools
15.0.0git
|
Maps a definition location onto an #include file, based on a set of filename rules. More...
#include <CanonicalIncludes.h>
Public Member Functions | |
void | addMapping (FileEntryRef Header, llvm::StringRef CanonicalPath) |
Adds a file-to-string mapping from ID to CanonicalPath . More... | |
llvm::StringRef | mapSymbol (llvm::StringRef QualifiedName) const |
Returns the overridden include for symbol with QualifiedName , or "". More... | |
llvm::StringRef | mapHeader (FileEntryRef Header) const |
Returns the overridden include for for files in Header , or "". More... | |
void | addSystemHeadersMapping (const LangOptions &Language) |
Adds mapping for system headers and some special symbols (e.g. More... | |
Maps a definition location onto an #include file, based on a set of filename rules.
Only const methods (i.e. mapHeader) in this class are thread safe.
Definition at line 37 of file CanonicalIncludes.h.
void clang::clangd::CanonicalIncludes::addMapping | ( | FileEntryRef | Header, |
llvm::StringRef | CanonicalPath | ||
) |
Adds a file-to-string mapping from ID
to CanonicalPath
.
Definition at line 23 of file CanonicalIncludes.cpp.
void clang::clangd::CanonicalIncludes::addSystemHeadersMapping | ( | const LangOptions & | Language | ) |
Adds mapping for system headers and some special symbols (e.g.
STL symbols in <iosfwd> need to be mapped individually). Approximately, the following system headers are handled:
Definition at line 86 of file CanonicalIncludes.cpp.
llvm::StringRef clang::clangd::CanonicalIncludes::mapHeader | ( | FileEntryRef | Header | ) | const |
Returns the overridden include for for files in Header
, or "".
Definition at line 32 of file CanonicalIncludes.cpp.
References Filename.
llvm::StringRef clang::clangd::CanonicalIncludes::mapSymbol | ( | llvm::StringRef | QualifiedName | ) | const |
Returns the overridden include for symbol with QualifiedName
, or "".
Definition at line 55 of file CanonicalIncludes.cpp.