Open rianquinn opened 6 years ago
I have the same issue, but it is tied to MockRepository
.
In the function:
void SomeFunc()
{
MockRepository mocks;
}
I get the following clang-tidy error:
Address of stack memory associated with local variable 'mocks' is still referred to by the global variable 'instance' upon returning to the caller. This will be a dangling reference [clang-analyzer-core.StackAddressEscape,-warnings-as-errors]
This would appear to be an issue with clang-tidy, because I find in the destructor of MockRepository
that the instance singleton is being cleared.
When using hippomocks with xxxFunc calls, clang-tidy's clang-analyzer-core.StackAddressEscape check is triggering.