File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
validation-test/compiler_scale Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -816,7 +816,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-04-25-a: 22f738a831d43aff2b9c9773bcb65
816
816
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-05-08-a: 7d98cc16689baba5c8a3b90a9329bdcc1a12b4e9
817
817
refs/heads/cherr42: a566ad54b073c2c56ac0a705d0a5bed9743135a5
818
818
"refs/heads/codable_test_comment_fix": fc8f6824f7f347e1e8db55bff62db385c5728b5a
819
- refs/heads/tensorflow: bbdc7ae8e558f9ad198e971e4156bb04e6b3452c
819
+ refs/heads/tensorflow: 14d0bbfc5e72a898c5fc9742b2c995b41bbea16e
820
820
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-11-a: 8126fd7a652e2f70ad6d76505239e34fb2ef3e1a
821
821
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-12-a: b3fd3dd84df6717f2e2e9df58c6d7e99fed57086
822
822
refs/tags/swift-4.1-DEVELOPMENT-SNAPSHOT-2018-05-13-a: 71135119579039dc321c5f65d870050fe36efda2
Original file line number Diff line number Diff line change @@ -189,21 +189,25 @@ template<typename Range>
189
189
void SourceLookupCache::doPopulateCache (Range decls,
190
190
bool onlyOperators) {
191
191
for (Decl *D : decls) {
192
- if (auto *VD = dyn_cast<ValueDecl>(D))
192
+ if (auto *VD = dyn_cast<ValueDecl>(D)) {
193
193
if (onlyOperators ? VD->isOperator () : VD->hasName ()) {
194
194
// Cache the value under both its compound name and its full name.
195
195
TopLevelValues.add (VD);
196
196
}
197
+ }
198
+
197
199
if (auto *NTD = dyn_cast<NominalTypeDecl>(D))
198
- doPopulateCache (NTD->getMembers (), true );
200
+ if (!NTD->hasUnparsedMembers () || NTD->maybeHasOperatorDeclarations ())
201
+ doPopulateCache (NTD->getMembers (), true );
199
202
200
203
// Avoid populating the cache with the members of invalid extension
201
204
// declarations. These members can be used to point validation inside of
202
205
// a malformed context.
203
206
if (D->isInvalid ()) continue ;
204
207
205
208
if (auto *ED = dyn_cast<ExtensionDecl>(D))
206
- doPopulateCache (ED->getMembers (), true );
209
+ if (!ED->hasUnparsedMembers () || ED->maybeHasOperatorDeclarations ())
210
+ doPopulateCache (ED->getMembers (), true );
207
211
}
208
212
}
209
213
Original file line number Diff line number Diff line change 1
- // RUN: %scale-test --sum-multi --parse -- begin 5 --end 16 --step 5 --select NumIterableDeclContextParsed %s
1
+ // RUN: %scale-test --sum-multi --begin 5 --end 16 --step 5 --select NumIterableDeclContextParsed %s
2
2
// REQUIRES: OS=macosx
3
3
// REQUIRES: asserts
4
4
You can’t perform that action at this time.
0 commit comments