Skip to content

Commit a8b5b1b

Browse files
committed
add tests
1 parent 8c14fc7 commit a8b5b1b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13118,6 +13118,12 @@ class TestOther : public TestFixture {
1311813118
check("struct S { int v(); explicit S(int v); };\n"
1311913119
"S::S(int v) : v(v) {}\n");
1312013120
ASSERT_EQUALS("", errout_str());
13121+
13122+
check("struct S { int i(); static void f(int i) {} };\n");
13123+
ASSERT_EQUALS("", errout_str());
13124+
13125+
check("struct S { static int i(); static void f(int i) {} };\n");
13126+
ASSERT_EQUALS("[test.cpp:1:23] -> [test.cpp:1:46]: (style) Argument 'i' shadows outer function [shadowFunction]\n", errout_str());
1312113127
}
1312213128

1312313129
void knownArgument() {

0 commit comments

Comments
 (0)