C++: Exclude error types from NonPortablePrintf.

This commit is contained in:
Geoffrey White
2020-10-21 14:51:52 +01:00
parent ac1e0692bb
commit d97f03c2be

View File

@@ -88,7 +88,8 @@ where
not arg.isAffectedByMacro() and
size32 = ilp32.paddedSize(actual) and
size64 = lp64.paddedSize(actual) and
size64 != size32
size64 != size32 and
not actual instanceof ErroneousType
select arg,
"This argument should be of type '" + expected.getName() + "' but is of type '" + actual.getName()
+ "' (which changes size from " + size32 + " to " + size64 + " on 64-bit systems)."