mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Rename db types relating to local classes
These now all refer to types or classes-or-interfaces.
This commit is contained in:
@@ -440,10 +440,10 @@ isAnonymClass(
|
||||
int parent: @classinstancexpr ref
|
||||
);
|
||||
|
||||
#keyset[classid] #keyset[parent]
|
||||
isLocalClass(
|
||||
int classid: @classorinterface ref,
|
||||
int parent: @localclassdeclstmt ref
|
||||
#keyset[typeid] #keyset[parent]
|
||||
isLocalClassOrInterface(
|
||||
int typeid: @classorinterface ref,
|
||||
int parent: @localtypedeclstmt ref
|
||||
);
|
||||
|
||||
isDefConstr(
|
||||
@@ -526,7 +526,7 @@ case @stmt.kind of
|
||||
| 15 = @labeledstmt
|
||||
| 16 = @assertstmt
|
||||
| 17 = @localvariabledeclstmt
|
||||
| 18 = @localclassdeclstmt
|
||||
| 18 = @localtypedeclstmt
|
||||
| 19 = @constructorinvocationstmt
|
||||
| 20 = @superconstructorinvocationstmt
|
||||
| 21 = @case
|
||||
|
||||
@@ -16910,7 +16910,7 @@
|
||||
</dependencies>
|
||||
</relation>
|
||||
<relation>
|
||||
<name>isLocalClass</name>
|
||||
<name>isLocalClassOrInterface</name>
|
||||
<cardinality>349</cardinality>
|
||||
<columnsizes>
|
||||
<e>
|
||||
|
||||
@@ -787,9 +787,9 @@ class LocalVariableDeclStmt extends Stmt, @localvariabledeclstmt {
|
||||
}
|
||||
|
||||
/** A statement that declares a local class or interface. */
|
||||
class LocalTypeDeclStmt extends Stmt, @localclassdeclstmt {
|
||||
class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
|
||||
/** Gets the local type declared by this statement. */
|
||||
LocalClassOrInterface getLocalType() { isLocalClass(result, this) }
|
||||
LocalClassOrInterface getLocalType() { isLocalClassOrInterface(result, this) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: Renamed `getLocalType` to reflect the fact that
|
||||
|
||||
@@ -722,7 +722,7 @@ class LocalClassOrInterface extends NestedType, ClassOrInterface {
|
||||
LocalClassOrInterface() { this.isLocal() }
|
||||
|
||||
/** Gets the statement that declares this local class. */
|
||||
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClass(this, result) }
|
||||
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClassOrInterface(this, result) }
|
||||
|
||||
/**
|
||||
* DEPRECATED: renamed `getLocalTypeDeclStmt` to reflect the fact that
|
||||
@@ -864,7 +864,7 @@ class Interface extends ClassOrInterface, @interface {
|
||||
/** A class or interface. */
|
||||
class ClassOrInterface extends RefType, @classorinterface {
|
||||
/** Holds if this class or interface is local. */
|
||||
predicate isLocal() { isLocalClass(this, _) }
|
||||
predicate isLocal() { isLocalClassOrInterface(this, _) }
|
||||
|
||||
/** Holds if this class or interface is package protected, that is, neither public nor private nor protected. */
|
||||
predicate isPackageProtected() {
|
||||
|
||||
@@ -440,10 +440,10 @@ isAnonymClass(
|
||||
int parent: @classinstancexpr ref
|
||||
);
|
||||
|
||||
#keyset[classid] #keyset[parent]
|
||||
isLocalClass(
|
||||
int classid: @classorinterface ref,
|
||||
int parent: @localclassdeclstmt ref
|
||||
#keyset[typeid] #keyset[parent]
|
||||
isLocalClassOrInterface(
|
||||
int typeid: @classorinterface ref,
|
||||
int parent: @localtypedeclstmt ref
|
||||
);
|
||||
|
||||
isDefConstr(
|
||||
@@ -526,7 +526,7 @@ case @stmt.kind of
|
||||
| 15 = @labeledstmt
|
||||
| 16 = @assertstmt
|
||||
| 17 = @localvariabledeclstmt
|
||||
| 18 = @localclassdeclstmt
|
||||
| 18 = @localtypedeclstmt
|
||||
| 19 = @constructorinvocationstmt
|
||||
| 20 = @superconstructorinvocationstmt
|
||||
| 21 = @case
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
description: Java 16: allow local interfaces
|
||||
compatibility: backwards
|
||||
isLocalClassOrInterface.rel: reorder isLocalClass.rel(int id, int parent) id parent
|
||||
isLocalClass.rel: delete
|
||||
|
||||
Reference in New Issue
Block a user