diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-14 20:25:25 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-14 20:25:25 +0000 |
commit | d86b9d634865606f4bb8cae96a17aa8593d903ea (patch) | |
tree | e122b3668c9e6b9dad86f698c2e19a8b81289d0e | |
parent | 67c415d679e705afb12e89a5409ccfc631c00e53 (diff) | |
download | llvm-d86b9d634865606f4bb8cae96a17aa8593d903ea.tar.gz |
--- 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
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 10 | ||||
-rw-r--r-- | clang/test/CXX/special/class.inhctor/elsewhere.cpp | 4 | ||||
-rw-r--r-- | clang/test/CXX/special/class.inhctor/p3.cpp | 4 | ||||
-rw-r--r-- | clang/test/CXX/special/class.inhctor/p7.cpp | 4 |
5 files changed, 18 insertions, 6 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 7cd6d9ed7f52..9fbc6010a7de 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -162,6 +162,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< diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 623e72f29980..1a12ed88ed9c 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2850,7 +2850,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 @@ -4226,8 +4227,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; } diff --git a/clang/test/CXX/special/class.inhctor/elsewhere.cpp b/clang/test/CXX/special/class.inhctor/elsewhere.cpp index 82944d65dfd1..83eeb00bf927 100644 --- a/clang/test/CXX/special/class.inhctor/elsewhere.cpp +++ b/clang/test/CXX/special/class.inhctor/elsewhere.cpp @@ -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] diff --git a/clang/test/CXX/special/class.inhctor/p3.cpp b/clang/test/CXX/special/class.inhctor/p3.cpp index 021f701ab495..be75b6c31055 100644 --- a/clang/test/CXX/special/class.inhctor/p3.cpp +++ b/clang/test/CXX/special/class.inhctor/p3.cpp @@ -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); diff --git a/clang/test/CXX/special/class.inhctor/p7.cpp b/clang/test/CXX/special/class.inhctor/p7.cpp index 3ad761f08baa..4f80896485e8 100644 --- a/clang/test/CXX/special/class.inhctor/p7.cpp +++ b/clang/test/CXX/special/class.inhctor/p7.cpp @@ -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 { |