diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-02-06 22:48:16 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-02-06 22:48:16 +0000 |
commit | 510190777c4bd53e960eea4665b204778fec1b64 (patch) | |
tree | db38a8a65c77dd9e8c50f9ac76d6eabf940e25df /test/Sema/assign.c | |
parent | c8edf6bd5f76bf50411d037c83d36847edfa68f0 (diff) |
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
Diffstat (limited to 'test/Sema/assign.c')
-rw-r--r-- | test/Sema/assign.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/assign.c b/test/Sema/assign.c index 43f4ba7b9a..b94d5835ee 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}} +} |