CodeQL library for C/C++
Search

Module BuiltInOperations

Provides classes for modeling built-in operations. Built-in operations are typically compiler specific and are used by libraries and generated code.

Import path

import semmle.code.cpp.exprs.BuiltInOperations

Imports

Expr

Provides classes modeling C/C++ expressions.

Classes

BuiltInChooseExpr

The __builtin_choose_expr expression. This is a GNU/Clang extension.

BuiltInComplexOperation

The GNU __builtin_complex operation.

BuiltInIntAddr

A C/C++ __INTADDR__ built-in operation (used by some implementations of offsetof). The operation retains its semantics even in the presence of an overloaded operator &). This is an EDG extension. struct S { int a, b; }; int d = __INTADDR__(struct S, b); // usually 4

BuiltInNoOp

A Microsoft C/C++ __noop expression, which does nothing. __noop;

BuiltInOperation

A C/C++ built-in operation. This is the root QL class encompassing built-in functionality.

BuiltInOperationBuiltInAddressOf

A clang __builtin_addressof function (can be used to implement C++’s std::addressof).

BuiltInOperationBuiltInConvertVector

A clang __builtin_convertvector expression.

BuiltInOperationBuiltInOffsetOf

A C/C++ __builtin_offsetof built-in operation (used by some implementations of offsetof). The operation retains its semantics even in the presence of an overloaded operator &). This is a GNU/Clang extension. struct S { int a, b; }; int d = __builtin_offsetof(struct S, b); // usually 4

BuiltInOperationBuiltInShuffleVector

A clang __builtin_shufflevector expression.

BuiltInOperationBuiltInTypesCompatibleP

A C++ __builtin_types_compatible_p built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasAssign

A C++ __has_assign built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasCopy

A C++ __has_copy built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasFinalizer

The __has_finalizer built-in operation. This is a Microsoft extension.

BuiltInOperationHasNoThrowAssign

A C++ __has_nothrow_assign built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasNoThrowConstructor

A C++ __has_nothrow_constructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasNoThrowCopy

A C++ __has_nothrow_copy built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasNothrowMoveAssign

The __has_nothrow_move_assign built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialAssign

A C++ __has_trivial_assign built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialConstructor

A C++ __has_trivial_constructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialCopy

A C++ __has_trivial_copy built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialDestructor

A C++ __has_trivial_destructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialMoveAssign

The __has_trivial_move_assign built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasTrivialMoveConstructor

The __has_trivial_move_constructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasUserDestructor

A C++ __has_user_destructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationHasVirtualDestructor

A C++ __has_virtual_destructor built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsAbstract

A C++ __is_abstract built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsBaseOf

A C++ __is_base_of built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsClass

A C++ __is_class built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsConstructible

The __is_constructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsConvertibleTo

A C++ __is_convertible_to built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsDelegate

The __is_delegate built-in operation. This is a Microsoft extension.

BuiltInOperationIsDestructible

The __is_destructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsEmpty

A C++ __is_empty built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsEnum

A C++ __is_enum built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsFinal

The __is_final built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsInterfaceClass

The __is_interface_class built-in operation. This is a Microsoft extension.

BuiltInOperationIsLiteralType

The __is_literal_type built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsNothrowAssignable

The __is_nothrow_assignable built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsNothrowConstructible

The __is_nothrow_constructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsNothrowDestructible

The __is_nothrow_destructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsPod

A C++ __is_pod built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsPolymorphic

A C++ __is_polymorphic built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsRefArray

The __is_ref_array built-in operation. This is a Microsoft extension.

BuiltInOperationIsRefClass

The __is_ref_class built-in operation. This is a Microsoft extension.

BuiltInOperationIsSealed

The __is_sealed built-in operation. This is a Microsoft extension.

BuiltInOperationIsSimpleValueClass

The __is_simple_value_class built-in operation. This is a Microsoft extension.

BuiltInOperationIsStandardLayout

The __is_standard_layout built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsTriviallyAssignable

The __is_trivially_assignable built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsTriviallyConstructible

The __is_trivially_constructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsTriviallyCopyable

The __is_trivially_copyable built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsTriviallyDestructible

The __is_trivially_destructible built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsUnion

A C++ __is_union built-in operation (used by some implementations of the <type_traits> header).

BuiltInOperationIsValueClass

The __is_value_class built-in operation. This is a Microsoft extension.

BuiltInVarArg

A C/C++ __builtin_va_arg built-in operation (used by some implementations of va_arg). ap = __builtin_va_arg(ap, long);

BuiltInVarArgCopy

A C/C++ __builtin_va_copy built-in operation (used by some implementations of va_copy). va_list ap, aq; __builtin_va_start(ap, last_named_param); va_copy(aq, ap);

BuiltInVarArgsEnd

A C/C++ __builtin_va_end built-in operation (used by some implementations of va_end). __builtin_va_start(ap, last_named_param); ap = __builtin_va_arg(ap, long); __builtin_va_end(ap);

BuiltInVarArgsStart

A C/C++ __builtin_va_start built-in operation (used by some implementations of va_start). __builtin_va_list ap; __builtin_va_start(ap, last_named_param);

VarArgsExpr

A C/C++ built-in operation that is used to support functions with variable numbers of arguments. This includes va_start, va_end, va_copy, and va_arg.

VectorFillOperation

Fill operation on a vector. This is a GNU extension.

Aliases

BuiltInOperationBuiltInTypes

DEPRECATED: Use BuiltInOperationBuiltInTypesCompatibleP instead.

BuiltInOperationOffsetOf

DEPRECATED: Use BuiltInOperationBuiltInOffsetOf instead.