mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 17:43:57 +00:00
8f01bb983c
Some standard header files from MSVC2012 use 'mutable' on references, though it is directly prohibited by the standard. Fix for http://llvm.org/PR22444 Differential Revision: http://reviews.llvm.org/D7370 llvm-svn: 228113
14 lines
272 B
C++
14 lines
272 B
C++
// 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;
|
|
}
|