Skip to content

Commit 4c46be1

Browse files
committed
Use 3 arg overload on Method for hasQualifiedName for Package/Name/Type
1 parent b02bac5 commit 4c46be1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

go/ql/lib/semmle/go/frameworks/XPath.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,13 @@ module XPath {
148148
*/
149149
private class LestratGoLibxml2XPathExpressionString extends Range {
150150
LestratGoLibxml2XPathExpressionString() {
151-
exists(Function f, string name | name.matches("Parse%") |
152-
f.hasQualifiedName("github.com/lestrrat-go/libxml2/parser.Parser", name) and
153-
//f.hasQualifiedName(package("github.com/lestrrat-go/libxml2/parser.Parser", ""), name) and
154-
this = f.getACall().getArgument(0)
151+
exists(Method m, string name | name.matches("Parse%") |
152+
m.hasQualifiedName(package("github.com/lestrrat-go/libxml2", "parser"), "Parser", name) and
153+
this = m.getACall().getArgument(0)
155154
)
156155
}
157156
}
158157

159-
160158
/**
161159
* An XPath expression string used in an API function of the
162160
* [xpathparser](https://github.com/santhosh-tekuri/xpathparser) package.

0 commit comments

Comments
 (0)