mirror of
https://github.com/github/codeql.git
synced 2026-02-12 05:01:06 +01:00
C++: Add isThisAccess predicate to ParamAccessForType
This commit is contained in:
@@ -394,6 +394,11 @@ class FunctionAccess extends Access, @routineexpr {
|
||||
*/
|
||||
class ParamAccessForType extends Expr, @param_ref {
|
||||
override string toString() { result = "param access" }
|
||||
|
||||
/**
|
||||
* Holds if the accessed parameter is implicit object parameter of the function.
|
||||
*/
|
||||
predicate isThisAccess() { param_ref_to_this(underlyingElement(this)) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2040,6 +2040,10 @@ new_array_allocated_type(
|
||||
int type_id: @type ref
|
||||
);
|
||||
|
||||
param_ref_to_this(
|
||||
int expr: @param_ref ref
|
||||
)
|
||||
|
||||
/**
|
||||
* The field being initialized by an initializer expression within an aggregate
|
||||
* initializer for a class/struct/union. Position is used to sort repeated initializers.
|
||||
|
||||
Reference in New Issue
Block a user