Open martong opened 6 years ago
This code may not be needed below, we should write a unit test which exercises it.
const ArrayType *FoundArray = Importer.getToContext().getAsArrayType(FoundVar->getType()); const ArrayType *TArray = Importer.getToContext().getAsArrayType(D->getType()); if (FoundArray && TArray) { if (isa<IncompleteArrayType>(FoundArray) && isa<ConstantArrayType>(TArray)) { // Import the type. QualType T = Importer.Import(D->getType()); if (T.isNull()) return nullptr; FoundVar->setType(T); FoundByLookup = FoundVar; break; } else if (isa<IncompleteArrayType>(TArray) && isa<ConstantArrayType>(FoundArray)) { FoundByLookup = FoundVar; break; }
This code may not be needed below, we should write a unit test which exercises it.