@@ -19,35 +19,21 @@ import cpp
19
19
* Holds if the argument corresponding to the `pos` conversion specifier
20
20
* of `ffc` is expected to have type `expected`.
21
21
*/
22
- pragma [ noopt]
23
22
private predicate formattingFunctionCallExpectedType (
24
23
FormattingFunctionCall ffc , int pos , Type expected
25
24
) {
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
33
26
}
34
27
35
28
/**
36
29
* Holds if the argument corresponding to the `pos` conversion specifier
37
30
* of `ffc` could alternatively have type `expected`, for example on a different
38
31
* platform.
39
32
*/
40
- pragma [ noopt]
41
33
private predicate formattingFunctionCallAlternateType (
42
34
FormattingFunctionCall ffc , int pos , Type expected
43
35
) {
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
51
37
}
52
38
53
39
/**
0 commit comments