https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132550
For consistency. >From 680d56fa84ce7a1ac98525f9ca61896b58e4398f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbae...@redhat.com> Date: Sat, 22 Mar 2025 15:23:07 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well For consistency. --- clang/lib/AST/ByteCode/InterpBuiltin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp b/clang/lib/AST/ByteCode/InterpBuiltin.cpp index 57037b674feba..300c4127a9856 100644 --- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp +++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp @@ -2052,9 +2052,7 @@ static bool interp__builtin_memchr(InterpState &S, CodePtr OpPC, (ID == Builtin::BIstrchr || ID == Builtin::BI__builtin_strchr); PrimType ElemT = - IsRawByte - ? PT_Sint8 - : *S.getContext().classify(Ptr.getFieldDesc()->getElemQualType()); + IsRawByte ? PT_Sint8 : *S.getContext().classify(getElemType(Ptr)); size_t Index = Ptr.getIndex(); size_t Step = 0; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits