From e7e86ef3330451a9216c7cd3b66bbe4ceb6a70c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 7 Aug 2010 10:12:39 +0200 Subject: [PATCH] calculation in sizeof: added two more ASSERT_EQUALS to guard against false positives --- test/testother.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/testother.cpp b/test/testother.cpp index 9d00decbd..6c1ce6060 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -2789,6 +2789,12 @@ private: { check("sizeof(a+b)"); ASSERT_EQUALS("[test.cpp:1]: (style) Found calculation inside sizeof()\n", errout.str()); + + check("sizeof(-a)"); + ASSERT_EQUALS("", errout.str()); + + check("sizeof(void * const)"); + ASSERT_EQUALS("", errout.str()); } void emptyCatchBlock()