Skip to content

Commit 5b8a6c8

Browse files
committed
CPP: Remove no longer used FormatLiteral.getEffectiveCharConversionChar.
1 parent e144778 commit 5b8a6c8

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

cpp/ql/src/semmle/code/cpp/commons/Printf.qll

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -670,29 +670,6 @@ class FormatLiteral extends Literal {
670670
)
671671
}
672672

673-
/**
674-
* Gets the 'effective' char type character, that is, 'c' (meaning a `char`) or
675-
* 'C' (meaning a `wchar_t`).
676-
* - in the base case this is the same as the format type character.
677-
* - for a `wprintf` or similar function call, the meanings are reversed.
678-
* - the size prefixes 'l'/'w' (long) and 'h' (short) override the
679-
* type character to effectively 'C' or 'c' respectively.
680-
*/
681-
private string getEffectiveCharConversionChar(int n) {
682-
exists(string len, string conv | this.parseConvSpec(n, _, _, _, _, _, len, conv) and (conv = "c" or conv = "C") |
683-
(len = "l" and result = "C") or
684-
(len = "w" and result = "C") or
685-
(len = "h" and result = "c") or
686-
(
687-
len != "l" and len != "w" and len != "h" and
688-
(result = "c" or result = "C") and
689-
(
690-
if isWideCharDefault() then result != conv else result = conv
691-
)
692-
)
693-
)
694-
}
695-
696673
/**
697674
* Gets the char type required by the nth conversion specifier.
698675
* - in the base case this is the default for the formatting function

0 commit comments

Comments
 (0)