CodeQL library for C/C++
Search

Module BitwiseOperation

Provides classes for modeling bitwise operations such as ~, <<, & and |.

Import path

import semmle.code.cpp.exprs.BitwiseOperation

Imports

Expr

Provides classes modeling C/C++ expressions.

Classes

BinaryBitwiseOperation

A C/C++ binary bitwise operation.

BitwiseAndExpr

A C/C++ bitwise AND expression. unsigned c = a & b;

BitwiseOrExpr

A C/C++ bitwise OR expression. unsigned c = a | b;

BitwiseXorExpr

A C/C++ bitwise XOR expression. unsigned c = a ^ b;

ComplementExpr

A C/C++ complement expression. unsigned c = ~a;

LShiftExpr

A C/C++ left shift expression. unsigned c = a << b;

RShiftExpr

A C/C++ right shift expression. unsigned c = a >> b;

UnaryBitwiseOperation

A C/C++ unary bitwise operation.