================ @@ -3363,6 +3363,7 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, #include "clang/Basic/RISCVVTypes.def" llvm_unreachable("not yet implemented"); } + break; ---------------- AaronBallman wrote:
My thinking was: if we add the `llvm_unreachable` as the last statement in the case for `Type::Builtin`, then any case in the nested switch which does not return will eventually hit that unreachable and be caught as a bug rather than falling through. If someone adds a new case to the nested switch, this still happens. As for the diagnostic, it's off by default (https://godbolt.org/z/PPs993TT9) but is something we explicitly opt into for the project to help us catch bugs: https://github.com/llvm/llvm-project/blob/bee2654300a8f524e05dd4cad41411d597246ac0/llvm/cmake/modules/HandleLLVMOptions.cmake#L824 https://github.com/llvm/llvm-project/pull/99763 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits