89 std::optional<StringRef>
96 std::optional<StringRef>
103 std::optional<StringRef>
114 using ExpansionMap = llvm::DenseMap<SourceLocation, MacroExpansionText>;
115 using ExpansionRangeMap = llvm::DenseMap<SourceLocation, SourceLocation>;
116 using FormattedExpansionMap = llvm::DenseMap<SourceLocation, std::string>;
120 ExpansionMap ExpandedTokens;
124 ExpansionRangeMap ExpansionRanges;
127 mutable FormattedExpansionMap FormattedExpandedTokens;
136 void onTokenLexed(
const Token &
Tok);
void registerForPreprocessor(Preprocessor &PP)
Register the necessary callbacks to the Preprocessor to record the expansion events and the generated...
LLVM_DUMP_METHOD void dumpExpandedTextsToStream(raw_ostream &OS) const
LLVM_DUMP_METHOD void dumpExpandedTexts() const
LLVM_DUMP_METHOD void dumpExpansionRanges() const
MacroExpansionContext(const LangOptions &LangOpts)
Creates a MacroExpansionContext.
std::optional< StringRef > getFormattedExpandedText(SourceLocation MacroExpansionLoc) const
LLVM_DUMP_METHOD void dumpExpansionRangesToStream(raw_ostream &OS) const
std::optional< StringRef > getExpandedText(SourceLocation MacroExpansionLoc) const
std::optional< StringRef > getOriginalText(SourceLocation MacroExpansionLoc) const