brintos

brintos / llvm-project-archived public Read only

0
0
Text · 600 B · d7e7c52 Raw
14 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 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