File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ predicate isSizeOfExprOperandMacroInvocationAConstInteger(
5353 // Special case for token pasting operator
5454 not exists ( Macro m | m = mi .getMacro ( ) | m .getBody ( ) .toString ( ) .regexpMatch ( "^.*\\s*##\\s*.*$" ) ) and
5555 // Special case for multichar literal integers that are exactly 4 character long (i.e. 'val1')
56+ // in these cases, the precompiler turns the string value into an integer, making it appear to be
57+ // a const macro of interest, but strings should be ignored.
5658 not exists ( Macro m | m = mi .getMacro ( ) | m .getBody ( ) .toString ( ) .regexpMatch ( "^'.{4}'$" ) ) and
5759 // Special case macros that are known to be used in buffer streams
5860 // where it is common index into a buffer or allocate a buffer size based on a constant
You can’t perform that action at this time.
0 commit comments