Unused struct member: Fix FPs seen in daca@home results for template structs

This commit is contained in:
Daniel Marjamäki 2019-03-06 20:51:48 +01:00
parent 572d7eb86c
commit 9d5f672dbc
1 changed files with 4 additions and 0 deletions

View File

@ -1254,6 +1254,10 @@ void CheckUnusedVar::checkStructMemberUsage()
if (!scope.functionList.empty())
continue;
// Bail out for template struct, members might be used in non-matching instantiations
if (scope.className.find("<") != std::string::npos)
continue;
// bail out if struct is inherited
bool bailout = false;
for (const Scope &derivedScope : symbolDatabase->scopeList) {