diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-20 21:43:47 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-20 21:43:47 +0000 |
commit | e3406826db726960ede77dd18361eb327d30c108 (patch) | |
tree | e3cdf714ef79435e4ff863753895340547a6a9c2 /lib | |
parent | ce7cd26dd03f514cb772ac8d95ef0a1e6cbfc846 (diff) |
Add a missing case for default constructor deletion.
This case is tested by the fact that the modified test produces
significatly worse diagnostics. That's on the list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 90c840ba7f..4fc9bf1fdd 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -3433,6 +3433,11 @@ bool Sema::ShouldDeleteDefaultConstructor(CXXConstructorDecl *CD) { // This is technically non-conformant, but sanity demands it. continue; } + } else if (!Union && FieldType.isConstQualified()) { + // -- any non-variant non-static data member of const-qualified type (or + // array thereof) with no brace-or-equal-initializer does not have a + // user-provided default constructor + return true; } InitializedEntity MemberEntity = |