Skip to content

Commit 2bac7f1

Browse files
committed
CPP: Deprecate old mechanisms FormattingFunction.isWideCharDefault and FormatLiteral.isWideCharDefault.
1 parent 5b8a6c8 commit 2bac7f1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ class FormatLiteral extends Literal {
215215
/**
216216
* Holds if the default meaning of `%s` is a `wchar_t *`, rather than
217217
* a `char *` (either way, `%S` will have the opposite meaning).
218+
* DEPRECATED: Use getDefaultCharType() instead.
218219
*/
219-
predicate isWideCharDefault() {
220+
deprecated predicate isWideCharDefault() {
220221
getUse().getTarget().(FormattingFunction).isWideCharDefault()
221222
}
222223

cpp/ql/src/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ abstract class FormattingFunction extends Function {
4949
/**
5050
* Holds if the default meaning of `%s` is a `wchar_t *`, rather than
5151
* a `char *` (either way, `%S` will have the opposite meaning).
52+
*
53+
* DEPRECATED: Use getDefaultCharType() instead.
5254
*/
53-
predicate isWideCharDefault() { none() }
55+
deprecated predicate isWideCharDefault() { none() }
5456

5557
/**
5658
* Gets the default character type expected for `%s` by this function. Typically

0 commit comments

Comments
 (0)