Skip to content

Commit a4ffe1a

Browse files
committed
C++: add calling convention specifier class
1 parent f209f53 commit a4ffe1a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ class AccessSpecifier extends Specifier {
9797
override string getAPrimaryQlClass() { result = "AccessSpecifier" }
9898
}
9999

100+
/**
101+
* A C/C++ calling convention specifier: `cdecl`, `fastcall`, `stdcall`, `thiscall`,
102+
* `vectorcall`, or `clrcall`.
103+
*/
104+
class CallingConventionSpecifier extends Specifier {
105+
CallingConventionSpecifier() { this.hasName(["cdecl", "fastcall", "stdcall", "thiscall", "vectorcall", "clrcall"]) }
106+
107+
override string getAPrimaryQlClass() { result = "CallingConventionSpecifier" }
108+
}
109+
100110
/**
101111
* An attribute introduced by GNU's `__attribute__((name))` syntax,
102112
* Microsoft's `__declspec(name)` syntax, Microsoft's `[name]` syntax, the

0 commit comments

Comments
 (0)