16bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// RUN: %clang_cc1 -fsyntax-only -verify %s
2ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao
3ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liaotypedef const int T0;
4ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liaotypedef int& T1;
5ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao
6ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liaostruct s0 {
7ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao  mutable const int f0; // expected-error{{'mutable' and 'const' cannot be mixed}}
8ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao  mutable T0 f1; // expected-error{{'mutable' and 'const' cannot be mixed}}
9ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao  mutable int &f2; // expected-error{{'mutable' cannot be applied to references}}
10ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao  mutable T1 f3; // expected-error{{'mutable' cannot be applied to references}}
116bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  mutable struct s1 {}; // expected-error{{'mutable' can only be applied to member variables}}
12ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao  mutable void im0(); // expected-error{{'mutable' cannot be applied to functions}}
13ea285162342df160e7860e26528bc7110bc6c0cdShih-wei Liao};
14