This commit is contained in:
parent
6f2d4361df
commit
b4f32206af
|
@ -924,7 +924,7 @@ void SymbolDatabase::createSymbolDatabaseCopyAndMoveConstructors()
|
||||||
if (firstArg->type() == scope->definedType) {
|
if (firstArg->type() == scope->definedType) {
|
||||||
if (firstArg->isRValueReference())
|
if (firstArg->isRValueReference())
|
||||||
func->type = Function::eMoveConstructor;
|
func->type = Function::eMoveConstructor;
|
||||||
else if (firstArg->isReference())
|
else if (firstArg->isReference() && !firstArg->isPointer())
|
||||||
func->type = Function::eCopyConstructor;
|
func->type = Function::eCopyConstructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,13 @@ private:
|
||||||
" }\n"
|
" }\n"
|
||||||
"};\n");
|
"};\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
// #8337 - False positive in copy constructor detection
|
||||||
|
checkCopyCtorAndEqOperator("struct StaticListNode {\n"
|
||||||
|
" StaticListNode(StaticListNode*& prev) : m_next(0) {}\n"
|
||||||
|
" StaticListNode* m_next;\n"
|
||||||
|
"};");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkExplicitConstructors(const char code[]) {
|
void checkExplicitConstructors(const char code[]) {
|
||||||
|
|
Loading…
Reference in New Issue