mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
16 lines
382 B
Plaintext
16 lines
382 B
Plaintext
/**
|
|
* @name Test for property access
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, PropertyAccess e
|
|
where
|
|
m.hasName("Bar") and
|
|
e.getEnclosingCallable() = m and
|
|
e.getTarget().getName() = "Length" and
|
|
e.getTarget().getDeclaringType() instanceof StringType and
|
|
e.getQualifier().(ParameterAccess).getTarget().getName() = "s" and
|
|
e.getEnclosingStmt() instanceof ReturnStmt
|
|
select m, e
|