================ @@ -858,8 +858,8 @@ bool ByteCodeExprGen<Emitter>::VisitStringLiteral(const StringLiteral *E) { // If the initializer string is too long, a diagnostic has already been // emitted. Read only the array length from the string literal. - unsigned N = - std::min(unsigned(CAT->getSize().getZExtValue()), E->getLength()); + unsigned ArraySize = CAT->getSize().getZExtValue(); ---------------- tbaederr wrote:
It's a bit tricky since `StringLiteral::getLength()` returns `unsigned` again, so we can't use the extra bytes anyway and need to cast to `unsigned` for the `std::min()`. https://github.com/llvm/llvm-project/pull/66862 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits