C++: Exclude error types from WrongTypeFormatArguments.

This commit is contained in:
Geoffrey White
2020-10-21 13:25:57 +01:00
parent 17155b64f5
commit ac1e0692bb

View File

@@ -155,7 +155,8 @@ where
not actual.getUnspecifiedType().(IntegralType).getSize() = sizeof_IntType()
) and
not arg.isAffectedByMacro() and
not arg.isFromUninstantiatedTemplate(_)
not arg.isFromUninstantiatedTemplate(_) and
not actual.getUnspecifiedType() instanceof ErroneousType
select arg,
"This argument should be of type '" + expected.getName() + "' but is of type '" +
actual.getUnspecifiedType().getName() + "'"