[PATCH] D136190: [clang][Sema][NFC] Remove redundant isTypeValid
Troy Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 27 12:48:29 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG488cf1038c88: [clang][Sema][NFC] Remove redundant isTypeValid (authored by troyj).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136190/new/
https://reviews.llvm.org/D136190
Files:
clang/lib/Sema/SemaOverload.cpp
Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -4606,15 +4606,6 @@
return ImplicitConversionSequence::Indistinguishable;
}
-/// Determine whether the given type is valid, e.g., it is not an invalid
-/// C++ class.
-static bool isTypeValid(QualType T) {
- if (CXXRecordDecl *Record = T->getAsCXXRecordDecl())
- return !Record->isInvalidDecl();
-
- return true;
-}
-
static QualType withoutUnaligned(ASTContext &Ctx, QualType T) {
if (!T.getQualifiers().hasUnaligned())
return T;
@@ -4664,7 +4655,6 @@
if (UnqualT1 == UnqualT2) {
// Nothing to do.
} else if (isCompleteType(Loc, OrigT2) &&
- isTypeValid(UnqualT1) && isTypeValid(UnqualT2) &&
IsDerivedFrom(Loc, UnqualT2, UnqualT1))
Conv |= ReferenceConversions::DerivedToBase;
else if (UnqualT1->isObjCObjectOrInterfaceType() &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136190.471266.patch
Type: text/x-patch
Size: 977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221027/a1b42131/attachment.bin>
More information about the cfe-commits
mailing list