See PR22444: <future>. On 3 Feb 2015 09:42, "Nico Weber" <[email protected]> wrote:
> Out of interest, which header file? We are able to parse all of Chromium > with MSVC2012 a while ago, and that uses lots of Windows headers. > > On Tue, Feb 3, 2015 at 2:32 AM, Alexey Bataev <[email protected]> > wrote: > >> Hi rsmith, >> >> Some standard header files from MSVC2012 use 'mutable' on references, >> though it is directly prohibited by the standard. >> >> http://reviews.llvm.org/D7370 >> >> Files: >> lib/Sema/SemaDecl.cpp >> test/SemaCXX/ms_mutable_reference_member.cpp >> >> Index: lib/Sema/SemaDecl.cpp >> =================================================================== >> --- lib/Sema/SemaDecl.cpp >> +++ lib/Sema/SemaDecl.cpp >> @@ -12347,7 +12347,7 @@ >> // Check that 'mutable' is consistent with the type of the declaration. >> if (!InvalidDecl && Mutable) { >> unsigned DiagID = 0; >> - if (T->isReferenceType()) >> + if (!getLangOpts().MSVCCompat && T->isReferenceType()) >> DiagID = diag::err_mutable_reference; >> else if (T.isConstQualified()) >> DiagID = diag::err_mutable_const; >> Index: test/SemaCXX/ms_mutable_reference_member.cpp >> =================================================================== >> --- test/SemaCXX/ms_mutable_reference_member.cpp >> +++ test/SemaCXX/ms_mutable_reference_member.cpp >> @@ -0,0 +1,14 @@ >> +// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-compatibility >> +// expected-no-diagnostics >> + >> +struct S { >> + mutable int &a; >> + S(int &b) : a(b) {} >> +}; >> + >> +int main() { >> + int a = 0; >> + const S s(a); >> + s.a = 10; >> + return s.a + a; >> +} >> >> EMAIL PREFERENCES >> http://reviews.llvm.org/settings/panel/emailpreferences/ >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> >> >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
