Skip to content

Commit 0a99d89

Browse files
committed
Add corresponding changes in MultiplexExternalSemaSource
1 parent b887050 commit 0a99d89

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

clang/include/clang/Sema/MultiplexExternalSemaSource.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class MultiplexExternalSemaSource : public ExternalSemaSource {
9292

9393
ExtKind hasExternalDefinitions(const Decl *D) override;
9494

95+
bool wasThisDeclarationADefinition(const FunctionDecl *FD) override;
96+
9597
/// Find all declarations with the given name in the
9698
/// given context.
9799
bool FindExternalVisibleDeclsByName(const DeclContext *DC,

clang/lib/Sema/MultiplexExternalSemaSource.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ MultiplexExternalSemaSource::hasExternalDefinitions(const Decl *D) {
107107
return EK_ReplyHazy;
108108
}
109109

110+
bool MultiplexExternalSemaSource::wasThisDeclarationADefinition(
111+
const FunctionDecl *FD) {
112+
for (const auto &S : Sources)
113+
if (S->wasThisDeclarationADefinition(FD))
114+
return true;
115+
return false;
116+
}
117+
110118
bool MultiplexExternalSemaSource::FindExternalVisibleDeclsByName(
111119
const DeclContext *DC, DeclarationName Name,
112120
const DeclContext *OriginalDC) {

0 commit comments

Comments
 (0)