We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
comparesFirstCharacter
1 parent a1b7096 commit 7b6a91eCopy full SHA for 7b6a91e
go/ql/lib/semmle/go/StringOps.qll
@@ -110,8 +110,8 @@ module StringOps {
110
DataFlow::EqualityTestNode eq, DataFlow::Node str, DataFlow::Node rhs
111
) {
112
exists(DataFlow::ElementReadNode read |
113
- eq.hasOperands(globalValueNumber(read).getANode(), rhs) and
114
- str = read.getBase() and
+ eq.hasOperands(globalValueNumber(pragma[only_bind_out](read)).getANode(), rhs) and
+ str = pragma[only_bind_out](read).getBase() and
115
str.getType().getUnderlyingType() instanceof StringType and
116
read.getIndex().getIntValue() = 0
117
)
0 commit comments