================
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D,
NamedDecl **Suggested,
if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility)
return true;
+ // The external source may have additional definitions of this entity that
are
+ // visible, so complete the redeclaration chain now.
+ if (auto *Source = Context.getExternalSource()) {
+ Source->CompleteRedeclChain(D);
+ }
----------------
ChuanqiXu9 wrote:
Maybe some gaps here. What I asked previously is:
1. According to the comments, it looks like we're trying to load all other
redeclarations of the current declaration, since we want to see if any
redeclaration of the current declaration is acceptable.
2. In Sema, ideally, when we want to the things above, we should call
`redecls()`.
then my question is, what is the problem?
1. There is a path in Sema that meant to look at redeclarations but not called
redecls().
2. Redecls get called but didn't work as expceted (not work well).
3. Or do I misunderstand the problem?
https://github.com/llvm/llvm-project/pull/129982
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits