diff options
Diffstat (limited to 'test/Parser/offsetof.c')
-rw-r--r-- | test/Parser/offsetof.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Parser/offsetof.c b/test/Parser/offsetof.c new file mode 100644 index 0000000000000..6c4e3feaa6943 --- /dev/null +++ b/test/Parser/offsetof.c @@ -0,0 +1,7 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +struct a { struct { int b; } x[2]; }; + +int a = __builtin_offsetof(struct a, x; // expected-error{{expected ')'}} expected-note{{to match this '('}} +// FIXME: This actually shouldn't give an error +int b = __builtin_offsetof(struct a, x->b); // expected-error{{expected ')'}} expected-note{{to match this '('}} |