]> granicus.if.org Git - clang/commitdiff
Disable inherited constructors for 2.9.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Sat, 12 Mar 2011 13:44:23 +0000 (13:44 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Sat, 12 Mar 2011 13:44:23 +0000 (13:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127541 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclCXX.cpp
test/CXX/special/class.inhctor/elsewhere.cpp
test/CXX/special/class.inhctor/p3.cpp
test/CXX/special/class.inhctor/p7.cpp

index 3a6c43c269c7a46ef6cb8dc641a430789c67adba..9a2d8d3c7ad6424f1048fdebdab4ec6fc3af99c2 100644 (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<
index f6551054c183901f90b0a9aeb68fb2de795fe228..7a597be871d3e566cee9f87e90bae8752ac9576c 100644 (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;
   }
 
index 82944d65dfd108e2e9bbbe1653067631cfa9f73a..83eeb00bf9276b3bdd5c64c0d75f4f3b8128a4cd 100644 (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]
 
index 021f701ab495eb43de2bdab7fb2aeba955026696..be75b6c3105545ea1257ff3af54d86295830ba03 100644 (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);
index 3ad761f08baa1dce9d53784d078fc9a7aefc193e..4f80896485e855431c02da7e47d7db8c1a7d017d 100644 (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 {