We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5ec929 commit fcaaf1dCopy full SHA for fcaaf1d
1 file changed
test/testother.cpp
@@ -195,6 +195,7 @@ class TestOther : public TestFixture {
195
TEST_CASE(duplicateExpression16); // #10569
196
TEST_CASE(duplicateExpression17); // #12036
197
TEST_CASE(duplicateExpression18);
198
+ TEST_CASE(duplicateExpression19);
199
TEST_CASE(duplicateExpressionLoop);
200
TEST_CASE(duplicateValueTernary);
201
TEST_CASE(duplicateValueTernarySizeof); // #13773
@@ -7988,6 +7989,14 @@ class TestOther : public TestFixture {
7988
7989
ASSERT_EQUALS("", errout_str());
7990
}
7991
7992
+ void duplicateExpression19() {
7993
+ checkP("const int i = 0;\n"
7994
+ "void f() {\n"
7995
+ " assert(i == 0);\n"
7996
+ "}\n");
7997
+ ASSERT_EQUALS("", errout_str());
7998
+ }
7999
+
8000
void duplicateExpressionLoop() {
8001
check("void f() {\n"
8002
" int a = 1;\n"
0 commit comments