[clang] [clang] Implement C2y stdc_memreverse8 and stdc_memreverse8u{8,16,32,64} builtins (PR #197358)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri May 15 05:15:51 PDT 2026
================
@@ -3863,6 +3863,18 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
return ExprError();
break;
+ case Builtin::BI__builtin_stdc_memreverse8:
+ case Builtin::BIstdc_memreverse8u8:
+ case Builtin::BIstdc_memreverse8u16:
+ case Builtin::BIstdc_memreverse8u32:
+ case Builtin::BIstdc_memreverse8u64:
+ if (Context.getTargetInfo().getCharWidth() != 8) {
+ Diag(TheCall->getBeginLoc(), diag::err_builtin_requires_char_bit_8)
----------------
AaronBallman wrote:
I agree with the code but I also don't think we have a way to test it either; we don't have options to let you control `CHAR_BIT` and we don't have targets that aren't 8-bit currently.
https://github.com/llvm/llvm-project/pull/197358
More information about the cfe-commits
mailing list