blob: ae1389d3336354604edcc0b5572fd2fbd6c91302 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-compatibility
struct S {
mutable int &a; // expected-warning {{'mutable' on a reference type is a Microsoft extension}}
S(int &b) : a(b) {}
};
int main() {
int a = 0;
const S s(a);
s.a = 10;
return s.a + a;
}
|