CodeQL library for C/C++
codeql/cpp-all 0.12.12-dev (changelog, source)
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

BuiltInBitCast

A C/C++ __builtin_bit_cast built-in operation (used by some implementations of std::bit_cast).

BuiltInChooseExpr

The __builtin_choose_expr expression. This is a gcc/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

BuiltInIsTrivial

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

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.

BuiltInOperationArrayExtent

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

BuiltInOperationArrayRank

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

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 gcc/clang extension. struct S { int a, b; }; int d = __builtin_offsetof(struct S, b); // usually 4

BuiltInOperationBuiltInShuffle

A gcc __builtin_shuffle expression.

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).

BuiltInOperationHasUniqueObjectRepresentations

A C++ __has_unique_object_representations 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).

BuiltInOperationIsAggregate

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

BuiltInOperationIsArithmetic

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

BuiltInOperationIsArray

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

BuiltInOperationIsAssignable

The __is_assignable 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).

BuiltInOperationIsCompleteType

A C++ __is_complete_type built-in operation.

BuiltInOperationIsCompound

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

BuiltInOperationIsConst

A C++ __is_const 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).

BuiltInOperationIsFloatingPoint

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

BuiltInOperationIsFunction

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

BuiltInOperationIsFundamental

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

BuiltInOperationIsIntegral

A C++ __is_integral 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.

BuiltInOperationIsLayoutCompatible

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

BuiltInOperationIsLiteralType

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

BuiltInOperationIsLvalueReference

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

BuiltInOperationIsMemberFunctionPointer

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

BuiltInOperationIsMemberObjectPointer

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

BuiltInOperationIsMemberPointer

A C++ __is_member_pointer 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).

BuiltInOperationIsObject

A C++ __is_object 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).

BuiltInOperationIsPointer

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

BuiltInOperationIsPointerInterconvertibleBaseOf

A C++ __is_pointer_interconvertible_base_of 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.

BuiltInOperationIsReference

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

BuiltInOperationIsRvalueReference

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

BuiltInOperationIsSame

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

BuiltInOperationIsScalar

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

BuiltInOperationIsSealed

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

BuiltInOperationIsSigned

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

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).

BuiltInOperationIsUnsigned

A C++ __is_unsigned 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.

BuiltInOperationIsVoid

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

BuiltInOperationIsVolatile

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

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.