Skip to content

Commit 40a8746

Browse files
committed
C++: Document potentially unexpected regex location information
1 parent 18074d0 commit 40a8746

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,12 @@ private module Impl implements RegexTreeViewSig {
225225
)
226226
}
227227

228-
/** Holds if this term is found at the specified location offsets. */
228+
/**
229+
* Holds if this term is found at the specified location offsets.
230+
*
231+
* Note: these locations may not be accurate when the regex was not defined as a raw string
232+
* and contains `\`-escaped characters.
233+
*/
229234
predicate hasLocationInfo(
230235
string filepath, int startline, int startcolumn, int endline, int endcolumn
231236
) {

0 commit comments

Comments
 (0)