summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2010-12-31 10:43:42 +0000
committerFrancois Pichet <pichet2000@gmail.com>2010-12-31 10:43:42 +0000
commit687aaf07cca21b12de6edb3ccb2022dc55453d39 (patch)
tree7163a359e9188274edf24dd5c0da94e583aaaa1c /clang/lib
parentc56f847a965ce547b82b1d4471b41d808f80cd4b (diff)
downloadbcm5719-llvm-687aaf07cca21b12de6edb3ccb2022dc55453d39.tar.gz
bcm5719-llvm-687aaf07cca21b12de6edb3ccb2022dc55453d39.zip
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
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaInit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 3cca42e48b7..e453b0a4edf 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)
OpenPOWER on IntegriCloud