diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Sema/expr-address-of.c | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Sema/expr-address-of.c')
-rw-r--r-- | test/Sema/expr-address-of.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Sema/expr-address-of.c b/test/Sema/expr-address-of.c index 2b8cfbf..32bd0df 100644 --- a/test/Sema/expr-address-of.c +++ b/test/Sema/expr-address-of.c @@ -90,8 +90,8 @@ void f5() { lvalue we would need to give a warning. Note that gcc warns about this as a register before it warns about it as an invalid lvalue. */ - int *_dummy0 = &(int*) arr; // expected-error {{address expression must be an lvalue or a function designator}} - int *_dummy1 = &(arr + 1); // expected-error {{address expression must be an lvalue or a function designator}} + int *_dummy0 = &(int*) arr; // expected-error {{cannot take the address of an rvalue}} + int *_dummy1 = &(arr + 1); // expected-error {{cannot take the address of an rvalue}} } void f6(register int x) { @@ -109,12 +109,12 @@ char* f7() { } void f8() { - void *dummy0 = &f8(); // expected-error {{address expression must be an lvalue or a function designator}} + void *dummy0 = &f8(); // expected-error {{cannot take the address of an rvalue of type 'void'}} extern void v; - void *dummy1 = &(1 ? v : f8()); // expected-error {{address expression must be an lvalue or a function designator}} + void *dummy1 = &(1 ? v : f8()); // expected-error {{cannot take the address of an rvalue of type 'void'}} - void *dummy2 = &(f8(), v); // expected-error {{address expression must be an lvalue or a function designator}} + void *dummy2 = &(f8(), v); // expected-error {{cannot take the address of an rvalue of type 'void'}} - void *dummy3 = &({ ; }); // expected-error {{address expression must be an lvalue or a function designator}} + void *dummy3 = &({ ; }); // expected-error {{cannot take the address of an rvalue of type 'void'}} } |