From 4ff0db1ec48dba6a4666909b817258ee045df10a Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 23 Aug 2021 08:51:54 +0200 Subject: [PATCH] #8631: Added regression test --- test/test64bit.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test64bit.cpp b/test/test64bit.cpp index d67c8ce3a..1f8acd0eb 100644 --- a/test/test64bit.cpp +++ b/test/test64bit.cpp @@ -39,6 +39,7 @@ private: TEST_CASE(ptrcompare); TEST_CASE(ptrarithmetic); TEST_CASE(returnIssues); + TEST_CASE(assignment); } void check(const char code[]) { @@ -56,6 +57,15 @@ private: check64BitPortability.pointerassignment(); } + void assignment() { + // #8631 + check("using CharArray = char[16];\n" + "void f() {\n" + " CharArray foo = \"\";\n" + "}"); + ASSERT_EQUALS("", errout.str()); + } + void novardecl() { // if the variable declarations can't be seen then skip the warning check("void foo()\n"