xref: /llvm-project/clang/test/Parser/offsetof.c (revision 8fbe78f6fc7b41d1a4228c126fcb522131150518)
1*8fbe78f6SDaniel Dunbar // RUN: %clang_cc1 -fsyntax-only -verify %s
25e774b13SEli Friedman 
35e774b13SEli Friedman struct a { struct { int b; } x[2]; };
45e774b13SEli Friedman 
55e774b13SEli Friedman int a = __builtin_offsetof(struct a, x; // expected-error{{expected ')'}} expected-note{{to match this '('}}
65e774b13SEli Friedman // FIXME: This actually shouldn't give an error
75e774b13SEli Friedman int b = __builtin_offsetof(struct a, x->b); // expected-error{{expected ')'}} expected-note{{to match this '('}}
8