CodeQL library for C/C++
codeql/cpp-all 0.12.9 (changelog, source)
Search

Module Function

Provides classes for working with functions, including template functions.

Import path

import semmle.code.cpp.Function

Imports

Call

Provides classes for modeling call expressions including direct calls to functions, constructor and destructor calls, and calls made through function pointers.

Class

Provides classes representing C++ classes, including structs, unions, and template classes.

Linkage

Provides the LinkTarget class representing linker invocations during the build process.

Location

Provides classes and predicates for locations in the source code.

MetricFunction
Parameter

Provides a class that models parameters to functions.

Classes

BuiltInFunction

A GCC built-in function. For example: __builtin___memcpy_chk.

DeductionGuide

A C++ deduction guide [N4659 17.9].

Function

A C/C++ function [N4140 8.3.5]. Both member functions and non-member functions are included. For example the function MyFunction in: void MyFunction() { DoSomething(); }

FunctionDeclarationEntry

A particular declaration or definition of a C/C++ function. For example the declaration and definition of MyFunction in the following code are each a FunctionDeclarationEntry:

FunctionTemplateInstantiation

A function that is an instantiation of a template. For example the instantiation myTemplateFunction<int> in the following code:

FunctionTemplateSpecialization

An explicit specialization of a C++ function template. For example the function myTemplateFunction<int> in the following code:

Operator

A C++ user-defined operator [N4140 13.5].

TemplateFunction

A C++ function which has a non-empty template argument list. For example the function myTemplateFunction in the following code: template<class T> void myTemplateFunction(T t) { ... }

TopLevelFunction

A C/C++ non-member function (a function that is not a member of any class). For example, in the following code, MyFunction is a TopLevelFunction but MyMemberFunction is not:

UserDefinedLiteral

A C++ user-defined literal [N4140 13.5.8].