[clang] [ASTMatcher] Fix redundant macro expansion checks in getExpansionLocOfMacro (PR #117143)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 22:09:31 PST 2024
================
@@ -697,27 +698,61 @@ static bool isTokenAtLoc(const SourceManager &SM, const LangOptions &LangOpts,
return !Invalid && Text == TokenText;
}
-std::optional<SourceLocation>
-getExpansionLocOfMacro(StringRef MacroName, SourceLocation Loc,
- const ASTContext &Context) {
+namespace {
+struct SourceLocationHash {
+ std::size_t operator()(const SourceLocation &Loc) const {
----------------
mandymimi wrote:
Got it, thank you
https://github.com/llvm/llvm-project/pull/117143
More information about the cfe-commits
mailing list