mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C++: add calling convention specifier class
This commit is contained in:
@@ -97,6 +97,18 @@ class AccessSpecifier extends Specifier {
|
|||||||
override string getAPrimaryQlClass() { result = "AccessSpecifier" }
|
override string getAPrimaryQlClass() { result = "AccessSpecifier" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A C/C++ calling convention specifier: `cdecl`, `fastcall`, `stdcall`, `thiscall`,
|
||||||
|
* `vectorcall`, or `clrcall`.
|
||||||
|
*/
|
||||||
|
class CallingConventionSpecifier extends Specifier {
|
||||||
|
CallingConventionSpecifier() {
|
||||||
|
this.hasName(["cdecl", "fastcall", "stdcall", "thiscall", "vectorcall", "clrcall"])
|
||||||
|
}
|
||||||
|
|
||||||
|
override string getAPrimaryQlClass() { result = "CallingConventionSpecifier" }
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An attribute introduced by GNU's `__attribute__((name))` syntax,
|
* An attribute introduced by GNU's `__attribute__((name))` syntax,
|
||||||
* Microsoft's `__declspec(name)` syntax, Microsoft's `[name]` syntax, the
|
* Microsoft's `__declspec(name)` syntax, Microsoft's `[name]` syntax, the
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import cpp
|
||||||
|
|
||||||
|
from FunctionDeclarationEntry func, CallingConventionSpecifier ccs
|
||||||
|
where ccs.hasName(func.getASpecifier())
|
||||||
|
select func, func.getASpecifier()
|
||||||
Reference in New Issue
Block a user