Skip to content

Commit 336221e

Browse files
author
David Ungar
committed
---
yaml --- r: 343903 b: refs/heads/master-rebranch c: e8cb103 h: refs/heads/master i: 343901: 4636ace 343899: 8cdec05 343895: 1158979 343887: d2c870f 343871: 5bc2e8e
1 parent 70fe547 commit 336221e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: 69afa806986099517d2924fa0deb6fdd3221688f
1458+
refs/heads/master-rebranch: e8cb103f41119c8578e7ef5fb166e853886d6367
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/include/swift/AST/DeclContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ class IterableDeclContext {
760760
void addMember(Decl *member, Decl *hint = nullptr);
761761

762762
/// See \c MemberCount
763-
unsigned getMemberCount() const { return MemberCount; }
763+
unsigned getMemberCount() const;
764764

765765
/// Check whether there are lazily-loaded members.
766766
bool hasLazyMembers() const {

branches/master-rebranch/lib/AST/DeclContext.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,12 @@ bool IterableDeclContext::hasUnparsedMembers() const {
807807
return true;
808808
}
809809

810+
unsigned IterableDeclContext::getMemberCount() const {
811+
if (hasUnparsedMembers())
812+
loadAllMembers();
813+
return MemberCount;
814+
}
815+
810816
void IterableDeclContext::loadAllMembers() const {
811817
ASTContext &ctx = getASTContext();
812818

0 commit comments

Comments
 (0)