ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
clang_c_base_layout.h File Reference
Include dependency graph for clang_c_base_layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool base_displacement (const namespacet &ns, const typet &derived, const irep_idt &base_id, BigInt &offset)
 Displacement of base_id's subobject inside derived, in bytes, under whichever layout ESBMC gave the class.

Function Documentation

◆ base_displacement()

bool base_displacement ( const namespacet & ns,
const typet & derived,
const irep_idt & base_id,
BigInt & offset )

Displacement of base_id's subobject inside derived, in bytes, under whichever layout ESBMC gave the class.

False when neither layout places the base at a single fixed displacement – a virtual base shared by two sibling bases has none.

The one oracle for this question. Shared rather than file-local because the IREP2 adjust pass needs the same answer, and taking the offset from anywhere else is the mistake scope-clang-c-irep2.md #3894 records (docs/roadmap/scope-clang-cpp-irep2.md \S3.12).