We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 185c0c1 commit 306167bCopy full SHA for 306167b
1 file changed
test/testclass.cpp
@@ -7741,6 +7741,19 @@ class TestClass : public TestFixture {
7741
" }\n"
7742
"};");
7743
ASSERT_EQUALS("[test.cpp:8:10]: (style, inconclusive) Technically the member function 'Fred::f2' can be const. [functionConst]\n", errout_str());
7744
+
7745
+ checkConst("struct T {\n" // #14390
7746
+ " std::vector<int*> v;\n"
7747
+ " void f() {\n"
7748
+ " for (const auto& p : v)\n"
7749
+ " *p = 0;\n"
7750
+ " }\n"
7751
+ " void g() {\n"
7752
+ " for (auto* p : v)\n"
7753
7754
7755
+ "};\n");
7756
+ ASSERT_EQUALS("", errout_str());
7757
}
7758
7759
void const_shared_ptr() { // #8674
0 commit comments