mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
C++: Implement Field indirection.
This commit is contained in:
@@ -39,7 +39,7 @@ module Input implements InputSig<DataFlowImplSpecific::CppDataFlow> {
|
||||
string encodeContent(ContentSet cs, string arg) {
|
||||
exists(FieldContent c |
|
||||
cs.isSingleton(c) and
|
||||
result = "Field" and
|
||||
result = indirectionString(c.getIndirectionIndex()) + "Field" and
|
||||
arg = c.getField().getName()
|
||||
)
|
||||
}
|
||||
@@ -81,6 +81,15 @@ module Input implements InputSig<DataFlowImplSpecific::CppDataFlow> {
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
bindingset[token]
|
||||
ContentSet decodeUnknownContent(AccessPath::AccessPathTokenBase token) {
|
||||
// field content (with indirection support).
|
||||
exists(FieldContent c |
|
||||
result.isSingleton(c) and
|
||||
token = indirectionString(c.getIndirectionIndex()) + c.getField().getName()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private import Make<DataFlowImplSpecific::CppDataFlow, Input> as Impl
|
||||
|
||||
Reference in New Issue
Block a user