diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 49e37faae779d26b8581cb41cfd29fa52d01c08b..944eca64ba6ecd743c95d60243c04177d4eff204 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -484,7 +484,6 @@ def err_no_nsconstant_string_class : Error< "cannot find interface declaration for %0">; def err_recursive_superclass : Error< "trying to recursively use %0 as superclass of %1">; -def warn_previous_alias_decl : Warning<"previously declared alias is ignored">; def err_conflicting_aliasing_type : Error<"conflicting types for alias %0">; def warn_undef_interface : Warning<"cannot find interface declaration for %0">; def warn_duplicate_protocol_def : Warning<"duplicate protocol definition of %0 is ignored">; diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 618c9d99e1bcf8747c7e72c5de3410893e515bef..e52f7435a32b9daaf4d8c3a823fd6bd480a30a30 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -603,10 +603,7 @@ Decl *Sema::ActOnCompatibilityAlias(SourceLocation AtLoc, NamedDecl *ADecl = LookupSingleName(TUScope, AliasName, AliasLocation, LookupOrdinaryName, ForRedeclaration); if (ADecl) { - if (isa<ObjCCompatibleAliasDecl>(ADecl)) - Diag(AliasLocation, diag::warn_previous_alias_decl); - else - Diag(AliasLocation, diag::err_conflicting_aliasing_type) << AliasName; + Diag(AliasLocation, diag::err_conflicting_aliasing_type) << AliasName; Diag(ADecl->getLocation(), diag::note_previous_declaration); return 0; } diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 3293e02a440c3dd1461ff25751e5ab9aa3917a65..57da3f9c9e06c09fdeba509b74eec91de63e42a2 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -18,7 +18,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (141): +CHECK: Warnings without flags (140): CHECK-NEXT: ext_delete_void_ptr_operand CHECK-NEXT: ext_enum_friend CHECK-NEXT: ext_expected_semi_decl_list @@ -136,7 +136,6 @@ CHECK-NEXT: warn_pragma_unused_expected_punc CHECK-NEXT: warn_pragma_unused_expected_var CHECK-NEXT: warn_pragma_unused_expected_var_arg CHECK-NEXT: warn_pragma_unused_undeclared_var -CHECK-NEXT: warn_previous_alias_decl CHECK-NEXT: warn_property_attr_mismatch CHECK-NEXT: warn_property_attribute CHECK-NEXT: warn_property_getter_owning_mismatch