mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Strengthen the type of SetterMethodCall
This commit is contained in:
@@ -123,7 +123,7 @@ class MethodCall extends Call, TMethodCall {
|
||||
* a[0] = 10
|
||||
* ```
|
||||
*/
|
||||
class SetterMethodCall extends MethodCall {
|
||||
class SetterMethodCall extends MethodCall, TMethodCallSynth {
|
||||
SetterMethodCall() { this = TMethodCallSynth(_, _, _, true, _) }
|
||||
|
||||
final override string getAPrimaryQlClass() { result = "SetterMethodCall" }
|
||||
|
||||
@@ -105,7 +105,6 @@ predicate basicStoreStep(Node nodeFrom, DataFlowPublic::LocalSourceNode nodeTo,
|
||||
*/
|
||||
private string getSetterCallAttributeName(AST::SetterMethodCall call) {
|
||||
// TODO: this should be exposed in `SetterMethodCall`
|
||||
not call instanceof AST::ElementReference and
|
||||
exists(string setterName |
|
||||
setterName = call.getMethodName() and result = setterName.prefix(setterName.length() - 1)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user