Disable inherited constructors for 2.9.

llvm-svn: 127541
This commit is contained in:
Sebastian Redl 2011-03-12 13:44:23 +00:00
parent b847bf547b
commit 1dc2c1d27f
5 changed files with 18 additions and 6 deletions

View File

@ -164,6 +164,8 @@ def err_using_decl_nested_name_specifier_is_current_class : Error<
"using declaration refers to its own class">;
def err_using_decl_nested_name_specifier_is_not_base_class : Error<
"using declaration refers into '%0', which is not a base class of %1">;
def err_using_decl_inherited_constructor_unsupported : Error<
"inherited constructors are not supported">;
def err_using_decl_constructor_not_in_direct_base : Error<
"%0 is not a direct base of %1, can not inherit constructors">;
def err_using_decl_constructor_conflict : Error<

View File

@ -2898,7 +2898,8 @@ void Sema::CheckCompletedCXXClass(CXXRecordDecl *Record) {
// waste space and performance on classes that are not meant to be
// instantiated (e.g. meta-functions). This doesn't apply to classes that
// have inherited constructors.
DeclareInheritedConstructors(Record);
// Disabled for 2.9
//DeclareInheritedConstructors(Record);
}
/// \brief Data used with FindHiddenVirtualMethod
@ -4324,8 +4325,11 @@ NamedDecl *Sema::BuildUsingDeclaration(Scope *S, AccessSpecifier AS,
// Constructor inheriting using decls get special treatment.
if (NameInfo.getName().getNameKind() == DeclarationName::CXXConstructorName) {
if (CheckInheritedConstructorUsingDecl(UD))
UD->setInvalidDecl();
// Disabled for 2.9
Diag(UD->getLocation(),
diag::err_using_decl_inherited_constructor_unsupported);
//if (CheckInheritedConstructorUsingDecl(UD))
UD->setInvalidDecl();
return UD;
}

View File

@ -1,4 +1,6 @@
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
// RUN: true
// Disabled for 2.9
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
// Tests related to constructor inheriting, but not specified in [class.inhctor]

View File

@ -1,4 +1,6 @@
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
// RUN: true
// Disabled for 2.9
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
struct B1 {
B1(int);

View File

@ -1,4 +1,6 @@
// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
// RUN: true
// Disabled for 2.9
//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
// Straight from the standard
struct B1 {