ΒΆllvm::Optional<SourceLocation>
getExpansionLocOfMacro(
    llvm::StringRef MacroName,
    clang::SourceLocation Loc,
    const clang::ASTContext& Context)

Description

If \p Loc is (transitively) expanded from macro \p MacroName, returns the location (in the chain of expansions) at which \p MacroName was expanded. Since the macro may have been expanded inside a series of expansions, that location may itself be a MacroID.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:2192

Parameters

llvm::StringRef MacroName
clang::SourceLocation Loc
const clang::ASTContext& Context