From d63d19474f61c2474353546aeb1f2f3d9d8b5596 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Sun, 13 Jul 2025 17:57:57 +0700 Subject: [PATCH] [CHERI] Silence warning about missing switch case. --- clang/lib/AST/ASTContext.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index b3e1689065732..56447b56e8db1 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -14221,16 +14221,14 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X, TX->getDepth(), TX->getIndex(), TX->isParameterPack(), getCommonDecl(TX->getDecl(), TY->getDecl())); } - // case Type::DependentPointer: { - // const auto *PX = cast(X), - // *PY = cast(Y); - // assert(PX->getPointerInterpretation() == PY->getPointerInterpretation()); - // return Ctx.getDependentPointerType( - // getCommonPointeeType(Ctx, PX, PY), - // PX->getPointerInterpretation(), - // PX->getQualifierLoc() - // ); - // } + case Type::DependentPointer: { + const auto *PX = cast(X), + *PY = cast(Y); + assert(PX->getPointerInterpretation() == PY->getPointerInterpretation()); + return Ctx.getDependentPointerType(getCommonPointeeType(Ctx, PX, PY), + PX->getPointerInterpretation(), + PX->getQualifierLoc()); + } } llvm_unreachable("Unknown Type Class"); }