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.
is_structured_binding
Variable
1 parent f875d72 commit e2bc4c8Copy full SHA for e2bc4c8
cpp/ql/lib/semmle/code/cpp/Variable.qll
@@ -169,6 +169,12 @@ class Variable extends Declaration, @variable {
169
variable_instantiation(underlyingElement(this), unresolveElement(v))
170
}
171
172
+ /**
173
+ * Holds if this variable is declated as part of a structured binding
174
+ * declaration. For example, `x` in `auto [x, y] = ...`.
175
+ */
176
+ predicate isStructuredBinding() { is_structured_binding(unresolveElement(this)) }
177
+
178
/**
179
* Holds if this is a compiler-generated variable. For example, a
180
* [range-based for loop](http://en.cppreference.com/w/cpp/language/range-for)
0 commit comments