Merge pull request #7928 from jketema/structured-bindings-db-scheme

C++: Add table that identifies C++ structured bindings
This commit is contained in:
Jeroen Ketema
2022-02-22 17:34:26 +01:00
committed by GitHub
10 changed files with 8409 additions and 0 deletions

View File

@@ -169,6 +169,12 @@ class Variable extends Declaration, @variable {
variable_instantiation(underlyingElement(this), unresolveElement(v))
}
/**
* 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(underlyingElement(this)) }
/**
* Holds if this is a compiler-generated variable. For example, a
* [range-based for loop](http://en.cppreference.com/w/cpp/language/range-for)