diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-02-12 21:07:34 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-02-12 21:07:34 +0000 |
| commit | cf7d164ec1c85e9f4d7a1508486342b67828e408 (patch) | |
| tree | bc38a8f1f6cd99f9e176be82bd51a4df156e71d5 /clang/test | |
| parent | aa150ed780be8448cadfd30ba2a91c857ab86c2d (diff) | |
| download | bcm5719-llvm-cf7d164ec1c85e9f4d7a1508486342b67828e408.tar.gz bcm5719-llvm-cf7d164ec1c85e9f4d7a1508486342b67828e408.zip | |
Sema: Semantically check _Atomic-qualified pointers
This fixes PR22568.
llvm-svn: 228959
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/pointer-addition.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/Sema/pointer-addition.c b/clang/test/Sema/pointer-addition.c index 21ce63b4381..667fe9a68c1 100644 --- a/clang/test/Sema/pointer-addition.c +++ b/clang/test/Sema/pointer-addition.c @@ -1,6 +1,7 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic -std=c11 -typedef struct S S; // expected-note 3 {{forward declaration of 'struct S'}} +typedef struct S S; // expected-note 4 {{forward declaration of 'struct S'}} +extern _Atomic(S*) e; void a(S* b, void* c) { void (*fp)(int) = 0; b++; // expected-error {{arithmetic on a pointer to an incomplete type}} @@ -18,4 +19,5 @@ void a(S* b, void* c) { d--; // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} d -= 1; // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} (void)(1 + d); // expected-warning {{arithmetic on a pointer to the function type 'void (S *, void *)' is a GNU extension}} + e++; // expected-error {{arithmetic on a pointer to an incomplete type}} } |

