Use underlyingElement in isStructuredBinding

Accodring to the documentation in `Element.qll`, `underlyingElement` is
supposed to be used here and not `unresolveElement`.
This commit is contained in:
Jeroen Ketema
2022-02-21 10:46:29 +01:00
parent d4832b48c6
commit e05af1e1d1

View File

@@ -173,7 +173,7 @@ class Variable extends Declaration, @variable {
* Holds if this variable is declated as part of a structured binding
* declaration. For example, `x` in `auto [x, y] = ...`.
*/
predicate isStructuredBinding() { is_structured_binding(unresolveElement(this)) }
predicate isStructuredBinding() { is_structured_binding(underlyingElement(this)) }
/**
* Holds if this is a compiler-generated variable. For example, a