[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed 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

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-29 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. 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

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66862 >From f2b9dec7ccf73258eb74c1823e4a954a459b5d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 20 Sep 2023 08:18:51 +0200 Subject: [PATCH] [clang][Interp] Zero-init remaining string liter

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Timm Baeder via cfe-commits
@@ -858,8 +858,8 @@ bool ByteCodeExprGen::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->get

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Shafik Yaghmour via cfe-commits
@@ -350,3 +350,22 @@ namespace ZeroInit { static_assert(b.f[0] == 0.0, ""); static_assert(b.f[1] == 0.0, ""); } + +namespace StringZeroFill { + struct A { +char c[12]; + }; + constexpr A a = { "abc" }; + static_assert(a.c[0] == 'a', ""); + static_assert(a.c[1] == '

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Shafik Yaghmour via cfe-commits
@@ -350,3 +350,22 @@ namespace ZeroInit { static_assert(b.f[0] == 0.0, ""); static_assert(b.f[1] == 0.0, ""); } + +namespace StringZeroFill { + struct A { +char c[12]; + }; + constexpr A a = { "abc" }; + static_assert(a.c[0] == 'a', ""); + static_assert(a.c[1] == '

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited 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

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Shafik Yaghmour via cfe-commits
@@ -858,8 +858,8 @@ bool ByteCodeExprGen::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->get

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Minor comments on testing but I am curious about the size question. https://github.com/llvm/llvm-project/pull/66862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-27 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping 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

[clang] [clang][Interp] Zero-init remaining string literal elements (PR #66862)

2023-09-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/66862 None >From 270735d2dd62027fdb42b8d29c79972434a5cde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 20 Sep 2023 08:18:51 +0200 Subject: [PATCH] [clang][Interp] Zero-init remaining string