Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49b0fc0

Browse files
committed
[CPP-386] A few more QL classes.
1 parent ab82aeb commit 49b0fc0

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

cpp/ql/src/semmle/code/cpp/UserType.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class UserType extends Type, Declaration, NameQualifyingElement, AccessHolder, @
1414
*/
1515
override string getName() { usertypes(underlyingElement(this),result,_) }
1616

17+
/** Canonical QL class corresponding to this element. */
18+
override string getCanonicalQLClass() { result = "UserType" }
19+
1720
/**
1821
* Gets the simple name of this type, without any template parameters. For example
1922
* if the name of the type is `"myType<int>"`, the simple name is just `"myType"`.
@@ -104,6 +107,9 @@ class TypeDeclarationEntry extends DeclarationEntry, @type_decl {
104107
override UserType getDeclaration() { result = getType() }
105108
override string getName() { result = getType().getName() }
106109

110+
/** Canonical QL class corresponding to this element. */
111+
override string getCanonicalQLClass() { result = "TypeDeclarationEntry" }
112+
107113
/**
108114
* The type which is being declared or defined.
109115
*/

cpp/ql/src/semmle/code/cpp/exprs/Lambda.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class LambdaCapture extends @lambdacapture {
106106
}
107107

108108
/** Canonical QL class corresponding to this element. */
109-
override string getCanonicalQLClass() { result = "LambdaCapture" }
109+
string getCanonicalQLClass() { result = "LambdaCapture" }
110110

111111
/**
112112
* Holds if this capture was made implicitly.

0 commit comments

Comments
 (0)