Skip to content

Commit 5d99e3d

Browse files
committed
[CHERI] Silence warning about missing switch case.
1 parent 988843c commit 5d99e3d

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14221,16 +14221,14 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X,
1422114221
TX->getDepth(), TX->getIndex(), TX->isParameterPack(),
1422214222
getCommonDecl(TX->getDecl(), TY->getDecl()));
1422314223
}
14224-
// case Type::DependentPointer: {
14225-
// const auto *PX = cast<DependentPointerType>(X),
14226-
// *PY = cast<DependentPointerType>(Y);
14227-
// assert(PX->getPointerInterpretation() == PY->getPointerInterpretation());
14228-
// return Ctx.getDependentPointerType(
14229-
// getCommonPointeeType(Ctx, PX, PY),
14230-
// PX->getPointerInterpretation(),
14231-
// PX->getQualifierLoc()
14232-
// );
14233-
// }
14224+
case Type::DependentPointer: {
14225+
const auto *PX = cast<DependentPointerType>(X),
14226+
*PY = cast<DependentPointerType>(Y);
14227+
assert(PX->getPointerInterpretation() == PY->getPointerInterpretation());
14228+
return Ctx.getDependentPointerType(getCommonPointeeType(Ctx, PX, PY),
14229+
PX->getPointerInterpretation(),
14230+
PX->getQualifierLoc());
14231+
}
1423414232
}
1423514233
llvm_unreachable("Unknown Type Class");
1423614234
}

0 commit comments

Comments
 (0)