From 1ee57283113b29ba569ada3167fe7cbf7b40589f Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Wed, 11 Feb 2026 13:40:20 +0000 Subject: [PATCH] Add missing QLDoc --- java/ql/lib/semmle/code/java/frameworks/Regex.qll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/ql/lib/semmle/code/java/frameworks/Regex.qll b/java/ql/lib/semmle/code/java/frameworks/Regex.qll index e1a89e3239d..28b7dd6a31a 100644 --- a/java/ql/lib/semmle/code/java/frameworks/Regex.qll +++ b/java/ql/lib/semmle/code/java/frameworks/Regex.qll @@ -96,10 +96,20 @@ class PatternMatchesCall extends MethodCall, RegexExecutionExpr::Range { class MatcherMatchesCall extends MethodCall, RegexExecutionExpr::Range { MatcherMatchesCall() { this.getMethod() instanceof MatcherMatchesMethod } + /** + * Get the call to `java.util.regex.Pattern.matcher` which returned the + * qualifier of this call. This is needed to determine the string being + * matched. + */ PatternMatcherCall getPatternMatcherCall() { DataFlow::localExprFlow(result, this.getQualifier()) } + /** + * Get the call to `java.util.regex.Pattern.compile` which returned the + * `Pattern` used by this matcher. This is needed to determine the regular + * expression being used. + */ PatternCompileCall getPatternCompileCall() { DataFlow::localExprFlow(result, this.getPatternMatcherCall()) }