C++: Expose whether a function was prototyped or not

This commit is contained in:
Jeroen Ketema
2023-11-27 17:10:36 +01:00
parent 68a7734e08
commit 7dec819151
9 changed files with 9657 additions and 721 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
description: Expose whether a function was prototyped or not
compatibility: backwards
function_prototyped.rel: delete

View File

@@ -112,6 +112,16 @@ class Function extends Declaration, ControlFlowNode, AccessHolder, @function {
*/
predicate isDeleted() { function_deleted(underlyingElement(this)) }
/**
* Holds if this function has a prototyped interface.
*
* Functions generally have a prototyped interface, unless they are
* K&R-style functions either without any forward function declaration,
* or with all the forward declarations omitting the parameters of the
* function.
*/
predicate isPrototyped() { function_prototyped(underlyingElement(this)) }
/**
* Holds if this function is explicitly defaulted with the `= default`
* specifier.

View File

@@ -405,6 +405,8 @@ function_deleted(unique int id: @function ref);
function_defaulted(unique int id: @function ref);
function_prototyped(unique int id: @function ref)
member_function_this_type(
unique int id: @function ref,
int this_type: @type ref

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: Expose whether a function was prototyped or not
compatibility: partial