forked from OSchip/llvm-project
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:
parent
c56f847a96
commit
687aaf07cc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue