Skip to content

Commit d86b9d6

Browse files
committed
--- Merging r127541 into '.':
U test/CXX/special/class.inhctor/p3.cpp U test/CXX/special/class.inhctor/elsewhere.cpp U test/CXX/special/class.inhctor/p7.cpp U include/clang/Basic/DiagnosticSemaKinds.td U lib/Sema/SemaDeclCXX.cpp llvm-svn: 127614
1 parent 67c415d commit d86b9d6

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def err_using_decl_nested_name_specifier_is_current_class : Error<
162162
"using declaration refers to its own class">;
163163
def err_using_decl_nested_name_specifier_is_not_base_class : Error<
164164
"using declaration refers into '%0', which is not a base class of %1">;
165+
def err_using_decl_inherited_constructor_unsupported : Error<
166+
"inherited constructors are not supported">;
165167
def err_using_decl_constructor_not_in_direct_base : Error<
166168
"%0 is not a direct base of %1, can not inherit constructors">;
167169
def err_using_decl_constructor_conflict : Error<

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,7 +2850,8 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
28502850
// waste space and performance on classes that are not meant to be
28512851
// instantiated (e.g. meta-functions). This doesn't apply to classes that
28522852
// have inherited constructors.
2853-
DeclareInheritedConstructors(Record);
2853+
// Disabled for 2.9
2854+
//DeclareInheritedConstructors(Record);
28542855
}
28552856

28562857
/// \brief Data used with FindHiddenVirtualMethod
@@ -4226,8 +4227,11 @@ NamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS,
42264227

42274228
// Constructor inheriting using decls get special treatment.
42284229
if (NameInfo.getName().getNameKind() == DeclarationName::CXXConstructorName) {
4229-
if (CheckInheritedConstructorUsingDecl(UD))
4230-
UD->setInvalidDecl();
4230+
// Disabled for 2.9
4231+
Diag(UD->getLocation(),
4232+
diag::err_using_decl_inherited_constructor_unsupported);
4233+
//if (CheckInheritedConstructorUsingDecl(UD))
4234+
UD->setInvalidDecl();
42314235
return UD;
42324236
}
42334237

clang/test/CXX/special/class.inhctor/elsewhere.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
1+
// RUN: true
2+
// Disabled for 2.9
3+
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
24

35
// Tests related to constructor inheriting, but not specified in [class.inhctor]
46

clang/test/CXX/special/class.inhctor/p3.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
1+
// RUN: true
2+
// Disabled for 2.9
3+
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
24

35
struct B1 {
46
B1(int);

clang/test/CXX/special/class.inhctor/p7.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
1+
// RUN: true
2+
// Disabled for 2.9
3+
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
24

35
// Straight from the standard
46
struct B1 {

0 commit comments

Comments
 (0)