From 687aaf07cca21b12de6edb3ccb2022dc55453d39 Mon Sep 17 00:00:00 2001 From: Francois Pichet Date: Fri, 31 Dec 2010 10:43:42 +0000 Subject: [PATCH] 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. llvm-svn: 122644 --- clang/lib/Sema/SemaInit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 3cca42e48b75..e453b0a4edfd 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -2610,7 +2610,7 @@ static void TryReferenceInitialization(Sema &S, // // 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)