@@ -19,35 +19,21 @@ import cpp
1919 * Holds if the argument corresponding to the `pos` conversion specifier
2020 * of `ffc` is expected to have type `expected`.
2121 */
22- pragma [ noopt]
2322private predicate formattingFunctionCallExpectedType (
2423 FormattingFunctionCall ffc , int pos , Type expected
2524) {
26- exists ( FormattingFunction f , int i , FormatLiteral fl |
27- ffc instanceof FormattingFunctionCall and
28- ffc .getTarget ( ) = f and
29- f .getFormatParameterIndex ( ) = i and
30- ffc .getArgument ( i ) = fl and
31- fl .getConversionType ( pos ) = expected
32- )
25+ ffc .getFormat ( ) .( FormatLiteral ) .getConversionType ( pos ) = expected
3326}
3427
3528/**
3629 * Holds if the argument corresponding to the `pos` conversion specifier
3730 * of `ffc` could alternatively have type `expected`, for example on a different
3831 * platform.
3932 */
40- pragma [ noopt]
4133private predicate formattingFunctionCallAlternateType (
4234 FormattingFunctionCall ffc , int pos , Type expected
4335) {
44- exists ( FormattingFunction f , int i , FormatLiteral fl |
45- ffc instanceof FormattingFunctionCall and
46- ffc .getTarget ( ) = f and
47- f .getFormatParameterIndex ( ) = i and
48- ffc .getArgument ( i ) = fl and
49- fl .getConversionTypeAlternate ( pos ) = expected
50- )
36+ ffc .getFormat ( ) .( FormatLiteral ) .getConversionTypeAlternate ( pos ) = expected
5137}
5238
5339/**
0 commit comments