[clang][NFC] remove unused return value
In working on p0388 (ary[N] -> ary[] conversion), I discovered neither use of UnwrapSimilarArrayTypes used the return value. So let's nuke it. Differential Revision: https://reviews.llvm.org/D102480
This commit is contained in:
parent
01c90bbd4f
commit
0566f97961
|
@ -2455,7 +2455,7 @@ public:
|
|||
const ObjCMethodDecl *MethodImp);
|
||||
|
||||
bool UnwrapSimilarTypes(QualType &T1, QualType &T2);
|
||||
bool UnwrapSimilarArrayTypes(QualType &T1, QualType &T2);
|
||||
void UnwrapSimilarArrayTypes(QualType &T1, QualType &T2);
|
||||
|
||||
/// Determine if two types are similar, according to the C++ rules. That is,
|
||||
/// determine if they are the same other than qualifiers on the initial
|
||||
|
|
|
@ -5766,29 +5766,29 @@ QualType ASTContext::getUnqualifiedArrayType(QualType type,
|
|||
/// Attempt to unwrap two types that may both be array types with the same bound
|
||||
/// (or both be array types of unknown bound) for the purpose of comparing the
|
||||
/// cv-decomposition of two types per C++ [conv.qual].
|
||||
bool ASTContext::UnwrapSimilarArrayTypes(QualType &T1, QualType &T2) {
|
||||
bool UnwrappedAny = false;
|
||||
void ASTContext::UnwrapSimilarArrayTypes(QualType &T1, QualType &T2) {
|
||||
while (true) {
|
||||
auto *AT1 = getAsArrayType(T1);
|
||||
if (!AT1) return UnwrappedAny;
|
||||
if (!AT1)
|
||||
return;
|
||||
|
||||
auto *AT2 = getAsArrayType(T2);
|
||||
if (!AT2) return UnwrappedAny;
|
||||
if (!AT2)
|
||||
return;
|
||||
|
||||
// If we don't have two array types with the same constant bound nor two
|
||||
// incomplete array types, we've unwrapped everything we can.
|
||||
if (auto *CAT1 = dyn_cast<ConstantArrayType>(AT1)) {
|
||||
auto *CAT2 = dyn_cast<ConstantArrayType>(AT2);
|
||||
if (!CAT2 || CAT1->getSize() != CAT2->getSize())
|
||||
return UnwrappedAny;
|
||||
return;
|
||||
} else if (!isa<IncompleteArrayType>(AT1) ||
|
||||
!isa<IncompleteArrayType>(AT2)) {
|
||||
return UnwrappedAny;
|
||||
return;
|
||||
}
|
||||
|
||||
T1 = AT1->getElementType();
|
||||
T2 = AT2->getElementType();
|
||||
UnwrappedAny = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue