summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c
blob: cbb4a14441844a0dec91dca44b1304c910b510df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdint.h>

struct Foo {
  int8_t a;
  int16_t b;
};

int main (int argc, char const *argv[]) {
    struct Foo f;
    return f.a; //% self.expect("expr offsetof(Foo, a)", substrs = ['= 0'])
                //% self.expect("expr offsetof(Foo, b)", substrs = ['= 2'])
}