mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Removed code duplication
This commit is contained in:
@@ -950,20 +950,6 @@ class ClassNode extends DataFlow::ValueNode, DataFlow::SourceNode {
|
||||
result = method.getBody().flow()
|
||||
)
|
||||
or
|
||||
// ES6 class property or Function-style class methods via constructor
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
receiver.hasPropertyWrite(name, result)
|
||||
)
|
||||
or
|
||||
// Function-style class methods via prototype
|
||||
kind = MemberKind::method() and
|
||||
exists(DataFlow::SourceNode proto |
|
||||
proto = this.getAPrototypeReference() and
|
||||
proto.hasPropertyWrite(name, result)
|
||||
)
|
||||
or
|
||||
// Function-style class accessors
|
||||
astNode instanceof Function and
|
||||
exists(PropertyAccessor accessor |
|
||||
@@ -995,20 +981,6 @@ class ClassNode extends DataFlow::ValueNode, DataFlow::SourceNode {
|
||||
result = method.getBody().flow()
|
||||
)
|
||||
or
|
||||
// ES6 class property or Function-style class methods via constructor
|
||||
kind = MemberKind::method() and
|
||||
exists(ThisNode receiver |
|
||||
receiver = this.getConstructor().getReceiver() and
|
||||
result = receiver.getAPropertySource()
|
||||
)
|
||||
or
|
||||
// Function-style class methods via prototype
|
||||
kind = MemberKind::method() and
|
||||
exists(DataFlow::SourceNode proto |
|
||||
proto = this.getAPrototypeReference() and
|
||||
result = proto.getAPropertySource()
|
||||
)
|
||||
or
|
||||
// Function-style class accessors
|
||||
astNode instanceof Function and
|
||||
exists(PropertyAccessor accessor |
|
||||
|
||||
Reference in New Issue
Block a user