| 4090 | } |
| 4091 | |
| 4092 | bool BfModule::CheckInternalProtection(BfTypeDef* usingTypeDef) |
| 4093 | { |
| 4094 | if ((mCurTypeInstance != NULL) && (mCurTypeInstance->IsSpecializedType())) |
| 4095 | return true; |
| 4096 | if ((mCurMethodInstance != NULL) && |
| 4097 | ((mCurMethodInstance->mIsUnspecializedVariation) || (mCurMethodInstance->IsSpecializedGenericMethod()))) |
| 4098 | return true; |
| 4099 | |
| 4100 | auto internalAccessSet = GetInternalAccessSet(); |
| 4101 | if (internalAccessSet == NULL) |
| 4102 | return false; |
| 4103 | |
| 4104 | for (auto& nameComposite : internalAccessSet->mNamespaces) |
| 4105 | { |
| 4106 | if (usingTypeDef->mNamespace.StartsWith(nameComposite)) |
| 4107 | return true; |
| 4108 | } |
| 4109 | |
| 4110 | for (auto internalType : internalAccessSet->mTypes) |
| 4111 | { |
| 4112 | auto checkTypeDef = usingTypeDef->GetDefinition(); |
| 4113 | while (checkTypeDef != NULL) |
| 4114 | { |
| 4115 | if (checkTypeDef == internalType->mTypeDef->GetDefinition()) |
| 4116 | return true; |
| 4117 | checkTypeDef = checkTypeDef->mOuterType; |
| 4118 | } |
| 4119 | } |
| 4120 | return false; |
| 4121 | } |
| 4122 | |
| 4123 | void PrintUsers(llvm::MDNode* md); |
| 4124 |
nothing calls this directly
no test coverage detected