mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Support more function types
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
class Function extends @function {
|
||||||
|
string toString() { none() }
|
||||||
|
}
|
||||||
|
|
||||||
|
from Function fun, string name, int kind, int kind_new
|
||||||
|
where
|
||||||
|
functions(fun, name, kind) and
|
||||||
|
if kind = 7 or kind = 8 then kind_new = 0 else kind_new = kind
|
||||||
|
select fun, name, kind_new
|
||||||
2240
cpp/downgrades/7f34caf73ca98314885030cc5a22b6e328fe687c/old.dbscheme
Normal file
2240
cpp/downgrades/7f34caf73ca98314885030cc5a22b6e328fe687c/old.dbscheme
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
|||||||
|
description: Support more function types
|
||||||
|
compatibility: full
|
||||||
|
functions.rel: run functions.qlo
|
||||||
@@ -885,3 +885,17 @@ class BuiltInFunction extends Function {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private predicate suppressUnusedThis(Function f) { any() }
|
private predicate suppressUnusedThis(Function f) { any() }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A C++ user-defined literal [N4140 13.5.8].
|
||||||
|
*/
|
||||||
|
class UserDefinedLiteral extends Function {
|
||||||
|
UserDefinedLiteral() { functions(underlyingElement(this), _, 7) }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A C++ deduction guide [N4659 17.9].
|
||||||
|
*/
|
||||||
|
class DeductionGuide extends Function {
|
||||||
|
DeductionGuide() { functions(underlyingElement(this), _, 8) }
|
||||||
|
}
|
||||||
|
|||||||
@@ -356,6 +356,8 @@ case @function.kind of
|
|||||||
| 4 = @conversion_function
|
| 4 = @conversion_function
|
||||||
| 5 = @operator
|
| 5 = @operator
|
||||||
| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk
|
| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk
|
||||||
|
| 7 = @user_defined_literal
|
||||||
|
| 8 = @deduction_guide
|
||||||
;
|
;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
|||||||
|
description: Support more function types
|
||||||
|
compatibility: backwards
|
||||||
Reference in New Issue
Block a user