<p dir="ltr">See PR22444: <future>.</p>
<div class="gmail_quote">On 3 Feb 2015 09:42, "Nico Weber" <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 3, 2015 at 2:32 AM, Alexey Bataev <span dir="ltr"><<a href="mailto:a.bataev@hotmail.com" target="_blank">a.bataev@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi rsmith,<br>
<br>
Some standard header files from MSVC2012 use 'mutable' on references, though it is directly prohibited by the standard.<br>
<br>
<a href="http://reviews.llvm.org/D7370" target="_blank">http://reviews.llvm.org/D7370</a><br>
<br>
Files:<br>
  lib/Sema/SemaDecl.cpp<br>
  test/SemaCXX/ms_mutable_reference_member.cpp<br>
<br>
Index: lib/Sema/SemaDecl.cpp<br>
===================================================================<br>
--- lib/Sema/SemaDecl.cpp<br>
+++ lib/Sema/SemaDecl.cpp<br>
@@ -12347,7 +12347,7 @@<br>
   // Check that 'mutable' is consistent with the type of the declaration.<br>
   if (!InvalidDecl && Mutable) {<br>
     unsigned DiagID = 0;<br>
-    if (T->isReferenceType())<br>
+    if (!getLangOpts().MSVCCompat && T->isReferenceType())<br>
       DiagID = diag::err_mutable_reference;<br>
     else if (T.isConstQualified())<br>
       DiagID = diag::err_mutable_const;<br>
Index: test/SemaCXX/ms_mutable_reference_member.cpp<br>
===================================================================<br>
--- test/SemaCXX/ms_mutable_reference_member.cpp<br>
+++ test/SemaCXX/ms_mutable_reference_member.cpp<br>
@@ -0,0 +1,14 @@<br>
+// RUN: %clang_cc1 %s -fsyntax-only -verify -fms-compatibility<br>
+// expected-no-diagnostics<br>
+<br>
+struct S {<br>
+  mutable int &a;<br>
+  S(int &b) : a(b) {}<br>
+};<br>
+<br>
+int main() {<br>
+  int a = 0;<br>
+  const S s(a);<br>
+  s.a = 10;<br>
+  return s.a + a;<br>
+}<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div>