STL: enable inconclusive warnings with --inconclusive
This commit is contained in:
parent
babafd75e3
commit
053b0d1654
|
@ -237,6 +237,8 @@ void CheckStl::iterators()
|
|||
bool inconclusiveType=false;
|
||||
if (!isIterator(var, inconclusiveType))
|
||||
continue;
|
||||
if (inconclusiveType && !mSettings->inconclusive)
|
||||
continue;
|
||||
|
||||
const unsigned int iteratorId = var->declarationId();
|
||||
|
||||
|
|
|
@ -1837,7 +1837,7 @@ private:
|
|||
"int foo() {\n"
|
||||
" iterator i;\n"
|
||||
" return i.foo();;\n"
|
||||
"}");
|
||||
"}", true);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("class iterator {\n"
|
||||
|
@ -1848,7 +1848,7 @@ private:
|
|||
"int foo() {\n"
|
||||
" iterator i;\n"
|
||||
" return i.foo();;\n"
|
||||
"}");
|
||||
"}", true);
|
||||
ASSERT_EQUALS("[test.cpp:8]: (error, inconclusive) Invalid iterator 'i' used.\n", errout.str());
|
||||
}
|
||||
|
||||
|
@ -1859,7 +1859,7 @@ private:
|
|||
" {\n"
|
||||
" }\n"
|
||||
" }\n"
|
||||
"}");
|
||||
"}", true);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
|
@ -3172,7 +3172,7 @@ private:
|
|||
" iterator it; \n"
|
||||
" it->m_place = 0;\n"
|
||||
" return it; \n"
|
||||
"}\n");
|
||||
"}\n", true);
|
||||
ASSERT_EQUALS("[test.cpp:18]: (error, inconclusive) Invalid iterator 'it' used.\n", errout.str());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue