File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6152,6 +6152,8 @@ TinyPtrVector<ValueDecl *> ClangRecordMemberLookup::evaluate(
6152
6152
NominalTypeDecl *inheritingDecl = desc.inheritingDecl ;
6153
6153
DeclName name = desc.name ;
6154
6154
6155
+ bool inheritedLookup = recordDecl != inheritingDecl;
6156
+
6155
6157
auto &ctx = recordDecl->getASTContext ();
6156
6158
auto directResults = evaluateOrDefault (
6157
6159
ctx.evaluator ,
@@ -6177,7 +6179,7 @@ TinyPtrVector<ValueDecl *> ClangRecordMemberLookup::evaluate(
6177
6179
6178
6180
// If this member is found due to inheritance, clone it from the base class
6179
6181
// by synthesizing getters and setters.
6180
- if (inheritingDecl != recordDecl ) {
6182
+ if (inheritedLookup ) {
6181
6183
imported = clangModuleLoader->importBaseMemberDecl (
6182
6184
cast<ValueDecl>(imported), inheritingDecl);
6183
6185
if (!imported)
@@ -6186,8 +6188,8 @@ TinyPtrVector<ValueDecl *> ClangRecordMemberLookup::evaluate(
6186
6188
result.push_back (cast<ValueDecl>(imported));
6187
6189
}
6188
6190
6189
- if (inheritingDecl != recordDecl ) {
6190
- // For inheritied members, add members that are synthesized eagerly, such as
6191
+ if (inheritedLookup ) {
6192
+ // For inherited members, add members that are synthesized eagerly, such as
6191
6193
// subscripts. This is not necessary for non-inherited members because those
6192
6194
// should already be in the lookup table.
6193
6195
for (auto member :
You can’t perform that action at this time.
0 commit comments