Merge pull request #64342 from hborla/macro-attribute-circularity

[Macros] Use the original attribute list when gathering possible macro-generated names in the source lookup cache.
This commit is contained in:
Holly Borla
2023-03-13 22:01:48 -07:00
committed by GitHub
2 changed files with 11 additions and 1 deletions

View File

@@ -350,7 +350,7 @@ void SourceLookupCache::populateAuxiliaryDeclCache() {
// macro does not produce the requested name, so the only impact is possibly
// expanding earlier than needed / unnecessarily looking in the top-level
// auxiliary decl cache.
for (auto attrConst : decl->getSemanticAttrs().getAttributes<CustomAttr>()) {
for (auto attrConst : decl->getAttrs().getAttributes<CustomAttr>()) {
auto *attr = const_cast<CustomAttr *>(attrConst);
UnresolvedMacroReference macroRef(attr);
auto macroName = macroRef.getMacroName().getBaseIdentifier();