Author: fpichet
Date: Fri Dec 31 04:43:42 2010
New Revision: 122644
URL: http://llvm.org/viewvc/llvm-project?rev=122644&view=rev
Log:
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
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)
Sequence.AddExtraneousCopyToTemporary(cv2T2);
if (DerivedToBase)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits