diff --git a/test/testother.cpp b/test/testother.cpp index 4f12bf4f622..1e04635af9d 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -7371,6 +7371,16 @@ class TestOther : public TestFixture { " if (std::is_same_v || std::is_same_v) {}\n" "}\n"); ASSERT_EQUALS("", errout.str()); + + checkP("#define F(v) (v) != 0\n" // #12392 + "template\n" + "void f() {\n" + " if (F(0)) {}\n" + "}\n" + "void g() {\n" + " f();\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); } void duplicateExpressionCompareWithZero() {