fix #3049 (False Positive - Technically the member function 'VideoOutputNull::SetupDeinterlace' can be const.)
This commit is contained in:
parent
6d9463139d
commit
dfe89f395a
|
@ -919,8 +919,13 @@ bool SymbolDatabase::argsMatch(const Scope *scope, const Token *first, const Tok
|
|||
|
||||
// skip default value assignment
|
||||
else if (first->next()->str() == "=")
|
||||
{
|
||||
first = first->tokAt(2);
|
||||
|
||||
if (second->next()->str() == "=")
|
||||
second = second->tokAt(2);
|
||||
}
|
||||
|
||||
// definition missing variable name
|
||||
else if (first->next()->str() == "," && second->next()->str() != ",")
|
||||
second = second->next();
|
||||
|
|
|
@ -179,6 +179,7 @@ private:
|
|||
TEST_CASE(const49); // ticket #2795
|
||||
TEST_CASE(const50); // ticket #2943
|
||||
TEST_CASE(const51); // ticket #3040
|
||||
TEST_CASE(const52); // ticket #3049
|
||||
TEST_CASE(assigningPointerToPointerIsNotAConstOperation);
|
||||
TEST_CASE(assigningArrayElementIsNotAConstOperation);
|
||||
TEST_CASE(constoperator1); // operator< can often be const
|
||||
|
@ -5660,6 +5661,23 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void const52() // ticket 3049
|
||||
{
|
||||
checkConst("class A {\n"
|
||||
" public:\n"
|
||||
" A() : foo(false) {};\n"
|
||||
" virtual bool One(bool b = false) { foo = b; return false; }\n"
|
||||
" private:\n"
|
||||
" bool foo;\n"
|
||||
"};\n"
|
||||
"class B : public A {\n"
|
||||
" public:\n"
|
||||
" B() {};\n"
|
||||
" bool One(bool b = false) { return false; }\n"
|
||||
"};\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void assigningPointerToPointerIsNotAConstOperation()
|
||||
{
|
||||
checkConst("struct s\n"
|
||||
|
|
Loading…
Reference in New Issue