summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-07-31 22:40:31 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-07-31 22:40:31 +0000
commit899b9c6666412cbe2be07564a50422b8e64e9f8a (patch)
tree7a2eea9334c986143f872ef149606a27218db199 /clang/lib/Sema
parent34df220410b36fd6643154d3d6071bac74403da0 (diff)
downloadbcm5719-llvm-899b9c6666412cbe2be07564a50422b8e64e9f8a.tar.gz
bcm5719-llvm-899b9c6666412cbe2be07564a50422b8e64e9f8a.zip
Explicitly defaulted constructors cannot be used for default initialization.
llvm-svn: 161088
Diffstat (limited to 'clang/lib/Sema')
-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 cab7661898b..27d58b23101 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -2906,7 +2906,7 @@ static void TryConstructorInitialization(Sema &S,
// user-provided default constructor.
if (Kind.getKind() == InitializationKind::IK_Default &&
Entity.getType().isConstQualified() &&
- cast<CXXConstructorDecl>(Best->Function)->isImplicit()) {
+ !cast<CXXConstructorDecl>(Best->Function)->isUserProvided()) {
Sequence.SetFailed(InitializationSequence::FK_DefaultInitOfConst);
return;
}
OpenPOWER on IntegriCloud