Skip to content

Commit e95ae40

Browse files
committed
C++: Fix QL-for-QL errors
1 parent aca8aa9 commit e95ae40

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cpp/ql/lib/semmle/code/cpp/regex/RegexTreeView.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ private module Impl implements RegexTreeViewSig {
622622
/**
623623
* Holds if this is a unicode escape.
624624
*/
625-
private predicate isUnicode() { this.getText().prefix(2) = "\\u" }
625+
private predicate isUnicode() { this.getText().matches("\\u%") }
626626

627627
/**
628628
* Gets the unicode char for this escape.
@@ -636,7 +636,7 @@ private module Impl implements RegexTreeViewSig {
636636
/**
637637
* Holds if this is a hex escape.
638638
*/
639-
private predicate isHex() { this.getText().prefix(2) = "\\x" }
639+
private predicate isHex() { this.getText().matches("\\x%") }
640640

641641
/**
642642
* Gets the unicode char for this escape.
@@ -650,7 +650,7 @@ private module Impl implements RegexTreeViewSig {
650650
/**
651651
* Holds if this is a `\cX` escape.
652652
*/
653-
private predicate isControl() { this.getText().prefix(2) = "\\c" }
653+
private predicate isControl() { this.getText().matches("\\c%") }
654654

655655
/**
656656
* Gets the unicode char for this escape.

0 commit comments

Comments
 (0)