File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
cpp/ql/src/semmle/code/cpp/models/interfaces Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ private Type stripTopLevelSpecifiersOnly(Type t) {
2121 * A type that is used as a format string by any formatting function.
2222 */
2323Type getAFormatterWideType ( ) {
24- exists ( FormattingFunction ff , Type t |
25- t = stripTopLevelSpecifiersOnly ( ff .getDefaultCharType ( ) ) and
26- t .getSize ( ) != 1 and
27- result .( PointerType ) .getBaseType ( ) = t
24+ exists ( FormattingFunction ff |
25+ result = stripTopLevelSpecifiersOnly ( ff .getDefaultCharType ( ) ) and
26+ result .getSize ( ) != 1
2827 )
2928}
3029
@@ -33,9 +32,9 @@ Type getAFormatterWideType() {
3332 * there is none.
3433 */
3534private Type getAFormatterWideTypeOrDefault ( ) {
36- result = getAFormatterWideType ( ) . ( PointerType ) . getBaseType ( ) or
35+ result = getAFormatterWideType ( ) or
3736 (
38- not exists ( getAFormatterWideType ( ) . ( PointerType ) . getBaseType ( ) ) and
37+ not exists ( getAFormatterWideType ( ) ) and
3938 result instanceof Wchar_t
4039 )
4140}
You can’t perform that action at this time.
0 commit comments