commit | 76b4983f4c80a8f51c57bc29dd2368353cdf4743 | [log] [tgz] |
---|---|---|
author | Eli Friedman <eli.friedman@gmail.com> | Wed Feb 06 22:48:16 2008 +0000 |
committer | Eli Friedman <eli.friedman@gmail.com> | Wed Feb 06 22:48:16 2008 +0000 |
tree | db38a8a65c77dd9e8c50f9ac76d6eabf940e25df | |
parent | 6b806042bb9da382ec2d0f8ae42cc17f967fb52d [diff] [blame] |
Make sure to propagate qualifiers through the member operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46830 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/assign.c b/test/Sema/assign.c index 43f4ba7..b94d583 100644 --- a/test/Sema/assign.c +++ b/test/Sema/assign.c
@@ -2,4 +2,6 @@ void *test1(void) { return 0; } - +void test2 (const struct {int a;} *x) { + x->a = 10; // expected-error {{read-only variable is not assignable}} +}