Skip to content

Commit e05af1e

Browse files
committed
Use underlyingElement in isStructuredBinding
Accodring to the documentation in `Element.qll`, `underlyingElement` is supposed to be used here and not `unresolveElement`.
1 parent d4832b4 commit e05af1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/Variable.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Variable extends Declaration, @variable {
173173
* Holds if this variable is declated as part of a structured binding
174174
* declaration. For example, `x` in `auto [x, y] = ...`.
175175
*/
176-
predicate isStructuredBinding() { is_structured_binding(unresolveElement(this)) }
176+
predicate isStructuredBinding() { is_structured_binding(underlyingElement(this)) }
177177

178178
/**
179179
* Holds if this is a compiler-generated variable. For example, a

0 commit comments

Comments
 (0)