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
This commit is contained in:
Francois Pichet 2010-12-31 10:43:42 +00:00
parent c56f847a96
commit 687aaf07cc
1 changed files with 1 additions and 1 deletions

View File

@ -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)