p10.cpp revision 6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3typedef const int T0;
4typedef int& T1;
5
6struct s0 {
7  mutable const int f0; // expected-error{{'mutable' and 'const' cannot be mixed}}
8  mutable T0 f1; // expected-error{{'mutable' and 'const' cannot be mixed}}
9  mutable int &f2; // expected-error{{'mutable' cannot be applied to references}}
10  mutable T1 f3; // expected-error{{'mutable' cannot be applied to references}}
11  mutable struct s1 {}; // expected-error{{'mutable' can only be applied to member variables}}
12  mutable void im0(); // expected-error{{'mutable' cannot be applied to functions}}
13};
14