From cf7ef2e7035b5f3ba973f2142a952c094c7056e5 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 3 Dec 2019 20:33:05 +0300 Subject: [PATCH] Valid code for incrementing raw pointer (#2418) --- test/testpostfixoperator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testpostfixoperator.cpp b/test/testpostfixoperator.cpp index 15ae8b2e6..c605ab27d 100644 --- a/test/testpostfixoperator.cpp +++ b/test/testpostfixoperator.cpp @@ -326,7 +326,10 @@ private: void pointer() { check("static struct class * ab;\n" "int * p;\n" - "p++;\n"); + "\n" + "void f() {\n" + " p++;\n" + "}\n"); ASSERT_EQUALS("", errout.str()); }