diff --git a/clang/lib/StaticAnalyzer/Checkers/CHERI/SubObjectRepresentabilityChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CHERI/SubObjectRepresentabilityChecker.cpp index e8b47960ab8b9..0c338fea9f456 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CHERI/SubObjectRepresentabilityChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CHERI/SubObjectRepresentabilityChecker.cpp @@ -163,8 +163,7 @@ SubObjectRepresentabilityChecker::getCheckFieldFn(ASTContext &ASTCtx) const { return nullptr; const auto &T = TI.getTriple(); - if (T.getArch() == llvm::Triple::riscv32 && - T.getSubArch() == llvm::Triple::RISCV32SubArch_cheriot_v1) { + if (T.getArch() == llvm::Triple::riscv32 && TI.hasFeature("xcheriot")) { return &checkFieldImpl; }