loplugin:vclwidgets: Adapt check for 'assert' for MSVCRT
Change-Id: I12a77b5b53e3a674c1ff1554b560a71605e141a6
This commit is contained in:
@@ -216,9 +216,17 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// checking for ParenExpr is a hacky way to ignore assert statements in older versions of clang (i.e. <= 3.2)
|
if (!pCallExpr) {
|
||||||
if (!pCallExpr && !dyn_cast<ParenExpr>(*i))
|
auto loc = (*i)->getLocStart();
|
||||||
nNumExtraStatements++;
|
if (!compiler.getSourceManager().isMacroBodyExpansion(loc)
|
||||||
|
|| (Lexer::getImmediateMacroName(
|
||||||
|
loc, compiler.getSourceManager(),
|
||||||
|
compiler.getLangOpts())
|
||||||
|
!= "assert"))
|
||||||
|
{
|
||||||
|
nNumExtraStatements++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bOk = bFoundDisposeOnce && nNumExtraStatements == 0;
|
bOk = bFoundDisposeOnce && nNumExtraStatements == 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user