diff --git a/cpp/ql/lib/semmle/code/cpp/Parameter.qll b/cpp/ql/lib/semmle/code/cpp/Parameter.qll index e45dd56e7204..90060bb9bf6b 100644 --- a/cpp/ql/lib/semmle/code/cpp/Parameter.qll +++ b/cpp/ql/lib/semmle/code/cpp/Parameter.qll @@ -49,6 +49,11 @@ class Parameter extends LocalScopeVariable, @parameter { result = "(unnamed parameter " + this.getIndex().toString() + ")" } + /** Gets a specifier for this parameter. */ + override Specifier getASpecifier() { + paramspecifiers(underlyingElement(this), unresolveElement(result)) + } + override string getAPrimaryQlClass() { result = "Parameter" } /** diff --git a/cpp/ql/lib/semmlecode.cpp.dbscheme b/cpp/ql/lib/semmlecode.cpp.dbscheme index e594389175c0..4dfb1d755c39 100644 --- a/cpp/ql/lib/semmlecode.cpp.dbscheme +++ b/cpp/ql/lib/semmlecode.cpp.dbscheme @@ -1005,6 +1005,11 @@ specifiers( unique string str: string ref ); +paramspecifiers( + int param_id: @parameter ref, + int spec_id: @specifier ref +); + typespecifiers( int type_id: @type ref, int spec_id: @specifier ref