CPP: Integrate and produce full results.

This commit is contained in:
Geoffrey White
2019-06-10 15:31:53 +01:00
parent e143870b65
commit a842ed56cf
2 changed files with 8 additions and 8 deletions

View File

@@ -117,6 +117,11 @@ class Variable extends Declaration, @variable {
or
exists (AssignExpr ae
| ae.getLValue().(Access).getTarget() = this and result = ae.getRValue())
or
exists(AggregateLiteral l |
this.getDeclaringType() = l.getType() and
result = l.getChild(this.(Field).getInitializationOrder())
)
}
/**
@@ -163,14 +168,6 @@ class Variable extends Declaration, @variable {
predicate isCompilerGenerated() { compgenerated(underlyingElement(this)) }
}
class ExtendedField extends Field {
override Expr getAnAssignedValue() {
exists(AggregateLiteral l |
this.getDeclaringType() = l.getType() and result = l.getChild(this.getInitializationOrder())
)
}
}
/**
* A particular declaration or definition of a C/C++ variable.
*/