Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KE2: Add more dbscheme comments #18081

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions java/ql/lib/config/semmlecode.dbscheme
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,16 @@ isLocalClassOrInterface(
int parent: @localtypedeclstmt ref
);

/**
* Holds if `constructorid` is a compiler-generated constructor,
* i.e. where it is not explicitly defined in the source code.
* For example, the constructor for
* ```
* class SomeClass {}
* ```
* Only holds for constructors of classes for which we see the
* source code, not classes from external libraries.
*/
isDefConstr(
int constructorid: @constructor ref
);
Expand All @@ -841,6 +851,25 @@ lambdaKind(
int bodyKind: int ref
);

/**
* Holds if `constructorid` is the canonical constructor of a Java
* record, e.g. the first constructor in
* ```
* record Rectangle(double length, double width) {
* public Rectangle(double length, double width) {
* if (length <= 0 || width <= 0) {
* throw new java.lang.IllegalArgumentException("Bad size");
* }
* this.length = length;
* this.width = width;
* }
*
* public Rectangle(double size) {
* this(size, size);
* }
* }
* ```
*/
isCanonicalConstr(
int constructorid: @constructor ref
);
Expand Down