Skip to content

Commit 44246b4

Browse files
committed
Complete the redecl chain.
1 parent 9172ced commit 44246b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/Sema/SemaType.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9180,6 +9180,12 @@ bool Sema::hasAcceptableDefinition(NamedDecl *D, NamedDecl **Suggested,
91809180
if (!getLangOpts().Modules && !getLangOpts().ModulesLocalVisibility)
91819181
return true;
91829182

9183+
// The external source may have additional definitions of this entity that are
9184+
// visible, so complete the redeclaration chain now.
9185+
if (auto *Source = Context.getExternalSource()) {
9186+
Source->CompleteRedeclChain(D);
9187+
}
9188+
91839189
// If this definition was instantiated from a template, map back to the
91849190
// pattern from which it was instantiated.
91859191
if (isa<TagDecl>(D) && cast<TagDecl>(D)->isBeingDefined()) {

0 commit comments

Comments
 (0)