From 8f6b0b41e7a4820d08a997682701c28f16f8a01b Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Sat, 17 Jun 2023 17:04:14 +0200 Subject: [PATCH] Simplify qt.cfg, wxwidgets.cfg (#5166) --- cfg/qt.cfg | 111 ++------------------------------------------- cfg/std.cfg | 6 +-- cfg/wxwidgets.cfg | 34 ++------------ test/testother.cpp | 12 +++++ 4 files changed, 20 insertions(+), 143 deletions(-) diff --git a/cfg/qt.cfg b/cfg/qt.cfg index b7c29297d..13d96ecb6 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -885,36 +885,6 @@ - - - false - - - - - false - - - - - false - - - - - false - - - - - false - - - - - false - - false @@ -949,10 +919,6 @@ 0: - - - false - @@ -1045,14 +1011,6 @@ - - - false - - - - - false @@ -1138,34 +1096,6 @@ - - - - - - - - - - - - false - - - - - - - - - - - - false - - - - @@ -4061,11 +3991,6 @@ 0: - - - false - - false @@ -4089,25 +4014,6 @@ - - - - false - - - - - false - - - - - - false - - - - false @@ -4159,13 +4065,6 @@ - - - false - - - - false @@ -4181,13 +4080,6 @@ - - - false - - - - @@ -5069,6 +4961,7 @@ + @@ -5123,6 +5016,8 @@ + + diff --git a/cfg/std.cfg b/cfg/std.cfg index b40a500be..fa499cf16 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -6667,7 +6667,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + @@ -6696,10 +6696,6 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun 0: - - false - - false diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index b8f825088..6d4051933 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -5256,10 +5256,10 @@ - - - - + + + + @@ -5482,16 +5482,6 @@ This is a wxWidgets 1.xx compatibility function; you should not use it in new code. - - - - - false - - - - - @@ -8953,22 +8943,6 @@ - - - false - - - - - false - - - - - - - false - false diff --git a/test/testother.cpp b/test/testother.cpp index e7f91ffda..0fa1c8c26 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -3220,6 +3220,18 @@ private: "[test.cpp:9]: (style) Parameter 'a' can be declared as pointer to const\n", errout.str()); + check("void g(int*);\n" + "void f(std::vector& v) {\n" + " g(v.data());\n" + "}\n"); + ASSERT_EQUALS("", errout.str()); + + check("void g(const int*);\n" + "void f(std::vector& v) {\n" + " g(v.data());\n" + "}\n"); + ASSERT_EQUALS("[test.cpp:2]: (style) Parameter 'v' can be declared as reference to const\n", errout.str()); + check("struct a {\n" " template \n" " void mutate();\n"