[cfe-commits] r122644 - /cfe/trunk/lib/Sema/SemaInit.cpp

Francois Pichet pichet2000 at gmail.com
Fri Dec 31 02:43:42 PST 2010

Author: fpichet
Date: Fri Dec 31 04:43:42 2010
New Revision: 122644

URL: http://llvm.org/viewvc/llvm-project?rev=122644&view=rev
MSVC doesn't require an accessible copy-constructor when binding a temporary class object to a const-reference.
Note: this is not a C++0x behavior change, it was already like that in MSVC 2003.

This fixes a compile error when parsing MSVC header files with clang.


Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=122644&r1=122643&r2=122644&view=diff
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Fri Dec 31 04:43:42 2010
@@ -2610,7 +2610,7 @@
       //   The constructor that would be used to make the copy shall
       //   be callable whether or not the copy is actually done.
-      if (!S.getLangOptions().CPlusPlus0x)
+      if (!S.getLangOptions().CPlusPlus0x && !S.getLangOptions().Microsoft)
       if (DerivedToBase)

More information about the cfe-commits mailing list