Skip to content

Commit 2cd4e1a

Browse files
committed
C++: Use Expr.stripType()
1 parent 12b4c0a commit 2cd4e1a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,7 @@ where
170170
) and
171171
not arg.isAffectedByMacro() and
172172
not arg.isFromUninstantiatedTemplate(_) and
173-
not actual.getUnspecifiedType() instanceof ErroneousType and
174-
not (
175-
expected instanceof PointerType and
176-
actual.getUnspecifiedType().(PointerType).getBaseType() instanceof ErroneousType
177-
) and
173+
not actual.stripType() instanceof ErroneousType and
178174
not arg.(Call).mayBeFromImplicitlyDeclaredFunction()
179175
select arg,
180176
"This format specifier for type '" + expected.getName() + "' does not match the argument type '" +

0 commit comments

Comments
 (0)