Skip to content

Commit a16dd1f

Browse files
committed
C++: add table relating specifiers and parameters
1 parent 14a84c3 commit a16dd1f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

cpp/ql/lib/semmle/code/cpp/Parameter.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ class Parameter extends LocalScopeVariable, @parameter {
4949
result = "(unnamed parameter " + this.getIndex().toString() + ")"
5050
}
5151

52+
/** Gets a specifier for this parameter. */
53+
override Specifier getASpecifier() {
54+
paramspecifiers(underlyingElement(this), unresolveElement(result))
55+
}
56+
5257
override string getAPrimaryQlClass() { result = "Parameter" }
5358

5459
/**

cpp/ql/lib/semmlecode.cpp.dbscheme

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,11 @@ specifiers(
10051005
unique string str: string ref
10061006
);
10071007

1008+
paramspecifiers(
1009+
int param_id: @parameter ref,
1010+
int spec_id: @specifier ref
1011+
);
1012+
10081013
typespecifiers(
10091014
int type_id: @type ref,
10101015
int spec_id: @specifier ref

0 commit comments

Comments
 (0)