revert old changes
This commit is contained in:
parent
d7835f199f
commit
61127950b0
|
@ -1630,9 +1630,6 @@ bool CheckUnusedVar::isRecordTypeWithoutSideEffects(const Type* type)
|
|||
|
||||
bool CheckUnusedVar::isVariableWithoutSideEffects(const Variable& var)
|
||||
{
|
||||
if (var.isPointer())
|
||||
return true;
|
||||
|
||||
const Type* variableType = var.type();
|
||||
if (variableType) {
|
||||
if (!isRecordTypeWithoutSideEffects(variableType))
|
||||
|
|
|
@ -459,6 +459,20 @@ private:
|
|||
"}");
|
||||
TODO_ASSERT_EQUALS("error", "", errout.str());
|
||||
|
||||
// constructor with hidden definition
|
||||
functionVariableUsage(
|
||||
"class B {\n"
|
||||
"public:\n"
|
||||
" B();\n"
|
||||
"};\n"
|
||||
"class A {\n"
|
||||
" B* b = new B;\n"
|
||||
"};\n"
|
||||
"int main() {\n"
|
||||
" A a;\n"
|
||||
"}");
|
||||
TODO_ASSERT_EQUALS("error", "", errout.str());
|
||||
|
||||
// side-effect variable
|
||||
functionVariableUsage(
|
||||
"class F {\n"
|
||||
|
|
Loading…
Reference in New Issue