Skip to content

Commit 4cd4896

Browse files
committed
STR37-C: toupper/tolower
add support for macro implementation using array expression
1 parent 47b26c9 commit 4cd4896

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpp/common/src/codingstandards/cpp/CharFunctions.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ private class CToOrIsCharMacroInvocation extends MacroInvocation, UseOfToOrIsCha
5454
result = ae.getArrayOffset().getFullyConverted().(Conversion).getExpr()
5555
)
5656
or
57+
// For the "toupper/tolower" APIs, QNX expands to an array access
58+
exists(ArrayExpr ae |
59+
ae = getExpr() and
60+
result = ae.getArrayOffset().getFullyConverted().(Conversion).getExpr()
61+
)
62+
or
5763
// For the tolower/toupper cases, a secondary macro is expanded
5864
exists(MacroInvocation mi |
5965
mi.getParentInvocation() = this and

0 commit comments

Comments
 (0)