We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78b4485 commit b14a976Copy full SHA for b14a976
test/testpostfixoperator.cpp
@@ -54,6 +54,7 @@ class TestPostfixOperator : public TestFixture {
54
TEST_CASE(testvolatile);
55
TEST_CASE(testiterator);
56
TEST_CASE(test2168);
57
+ TEST_CASE(pointerSimplest);
58
TEST_CASE(pointer); // #2321 - postincrement of pointer is OK
59
TEST_CASE(testtemplate); // #4686
60
TEST_CASE(testmember);
@@ -314,6 +315,14 @@ class TestPostfixOperator : public TestFixture {
314
315
ASSERT_EQUALS("", errout.str());
316
}
317
318
+ void pointerSimplest() {
319
+ check("void f(int* p){\n"
320
+ " p++;\n"
321
+ " std::cout << *p;\n"
322
+ "}");
323
+ ASSERT_EQUALS("", errout.str());
324
+ }
325
+
326
void pointer() {
327
check("static struct class * ab;\n"
328
"int * p;\n"
0 commit comments