88import semmle.code.cpp.models.interfaces.FormattingFunction
99import semmle.code.cpp.models.interfaces.Alias
1010import semmle.code.cpp.models.interfaces.SideEffect
11+ import semmle.code.cpp.models.interfaces.NonThrowing
1112
1213/**
1314 * The standard functions `printf`, `wprintf` and their glib variants.
1415 */
15- private class Printf extends FormattingFunction , AliasFunction {
16+ private class Printf extends FormattingFunction , AliasFunction , NonThrowingFunction {
1617 Printf ( ) {
1718 this instanceof TopLevelFunction and
1819 (
@@ -36,7 +37,7 @@ private class Printf extends FormattingFunction, AliasFunction {
3637/**
3738 * The standard functions `fprintf`, `fwprintf` and their glib variants.
3839 */
39- private class Fprintf extends FormattingFunction {
40+ private class Fprintf extends FormattingFunction , NonThrowingFunction {
4041 Fprintf ( ) {
4142 this instanceof TopLevelFunction and
4243 (
@@ -54,7 +55,7 @@ private class Fprintf extends FormattingFunction {
5455/**
5556 * The standard function `sprintf` and its Microsoft and glib variants.
5657 */
57- private class Sprintf extends FormattingFunction {
58+ private class Sprintf extends FormattingFunction , NonThrowingFunction {
5859 Sprintf ( ) {
5960 this instanceof TopLevelFunction and
6061 (
@@ -97,7 +98,7 @@ private class Sprintf extends FormattingFunction {
9798/**
9899 * Implements `Snprintf`.
99100 */
100- private class SnprintfImpl extends Snprintf , AliasFunction , SideEffectFunction {
101+ private class SnprintfImpl extends Snprintf , AliasFunction , SideEffectFunction , NonThrowingFunction {
101102 SnprintfImpl ( ) {
102103 this instanceof TopLevelFunction and
103104 (
@@ -172,7 +173,7 @@ private class SnprintfImpl extends Snprintf, AliasFunction, SideEffectFunction {
172173 * and
173174 * https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms860435(v=msdn.10)
174175 */
175- private class StringCchPrintf extends FormattingFunction {
176+ private class StringCchPrintf extends FormattingFunction , NonThrowingFunction {
176177 StringCchPrintf ( ) {
177178 this instanceof TopLevelFunction and
178179 exists ( string baseName |
@@ -204,7 +205,7 @@ private class StringCchPrintf extends FormattingFunction {
204205/**
205206 * The standard function `syslog`.
206207 */
207- private class Syslog extends FormattingFunction {
208+ private class Syslog extends FormattingFunction , NonThrowingFunction {
208209 Syslog ( ) {
209210 this instanceof TopLevelFunction and
210211 this .hasGlobalName ( "syslog" ) and
0 commit comments