[cfe-commits] r127542 - in /cfe/trunk: 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
Sebastian Redl
sebastian.redl at getdesigned.at
Sat Mar 12 05:44:32 PST 2011
Author: cornedbee
Date: Sat Mar 12 07:44:32 2011
New Revision: 127542
URL: http://llvm.org/viewvc/llvm-project?rev=127542&view=rev
Log:
Revert "Disable inherited constructors for 2.9."
It is only meant for the release branch.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp
cfe/trunk/test/CXX/special/class.inhctor/p3.cpp
cfe/trunk/test/CXX/special/class.inhctor/p7.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=127542&r1=127541&r2=127542&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sat Mar 12 07:44:32 2011
@@ -164,8 +164,6 @@
"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<
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=127542&r1=127541&r2=127542&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Mar 12 07:44:32 2011
@@ -2898,8 +2898,7 @@
// 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.
- // Disabled for 2.9
- //DeclareInheritedConstructors(Record);
+ DeclareInheritedConstructors(Record);
}
/// \brief Data used with FindHiddenVirtualMethod
@@ -4325,11 +4324,8 @@
// Constructor inheriting using decls get special treatment.
if (NameInfo.getName().getNameKind() == DeclarationName::CXXConstructorName) {
- // Disabled for 2.9
- Diag(UD->getLocation(),
- diag::err_using_decl_inherited_constructor_unsupported);
- //if (CheckInheritedConstructorUsingDecl(UD))
- UD->setInvalidDecl();
+ if (CheckInheritedConstructorUsingDecl(UD))
+ UD->setInvalidDecl();
return UD;
}
Modified: cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp?rev=127542&r1=127541&r2=127542&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp (original)
+++ cfe/trunk/test/CXX/special/class.inhctor/elsewhere.cpp Sat Mar 12 07:44:32 2011
@@ -1,6 +1,4 @@
-// RUN: true
-// Disabled for 2.9
-//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
// Tests related to constructor inheriting, but not specified in [class.inhctor]
Modified: cfe/trunk/test/CXX/special/class.inhctor/p3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.inhctor/p3.cpp?rev=127542&r1=127541&r2=127542&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.inhctor/p3.cpp (original)
+++ cfe/trunk/test/CXX/special/class.inhctor/p3.cpp Sat Mar 12 07:44:32 2011
@@ -1,6 +1,4 @@
-// RUN: true
-// Disabled for 2.9
-//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
struct B1 {
B1(int);
Modified: cfe/trunk/test/CXX/special/class.inhctor/p7.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.inhctor/p7.cpp?rev=127542&r1=127541&r2=127542&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.inhctor/p7.cpp (original)
+++ cfe/trunk/test/CXX/special/class.inhctor/p7.cpp Sat Mar 12 07:44:32 2011
@@ -1,6 +1,4 @@
-// RUN: true
-// Disabled for 2.9
-//%clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
// Straight from the standard
struct B1 {
More information about the cfe-commits
mailing list