Skip to content

Commit ac1e069

Browse files
committed
C++: Exclude error types from WrongTypeFormatArguments.
1 parent 17155b6 commit ac1e069

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/Likely Bugs/Format/WrongTypeFormatArguments.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ where
155155
not actual.getUnspecifiedType().(IntegralType).getSize() = sizeof_IntType()
156156
) and
157157
not arg.isAffectedByMacro() and
158-
not arg.isFromUninstantiatedTemplate(_)
158+
not arg.isFromUninstantiatedTemplate(_) and
159+
not actual.getUnspecifiedType() instanceof ErroneousType
159160
select arg,
160161
"This argument should be of type '" + expected.getName() + "' but is of type '" +
161162
actual.getUnspecifiedType().getName() + "'"

0 commit comments

Comments
 (0)