Skip to content

Commit 8b39244

Browse files
committed
Include the literal 0 in OctalLiteral
1 parent d9f0911 commit 8b39244

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/common/src/codingstandards/cpp/Cpp14Literal.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module Cpp14Literal {
2424
* Octal literals must always start with the digit `0`.
2525
*/
2626
class OctalLiteral extends IntegerLiteral {
27-
OctalLiteral() { getValueText().regexpMatch("\\s*0[0-7']+[uUlL]*\\s*") }
27+
OctalLiteral() { getValueText().regexpMatch("\\s*0[0-7']*[uUlL]*\\s*") }
2828

2929
override string getAPrimaryQlClass() { result = "OctalLiteral" }
3030
}

0 commit comments

Comments
 (0)