From 104f96ba1a59026d6a71b4ef39ca127b56324e4a Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 21 Jun 2013 01:49:53 +0000 Subject: [PATCH] Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184517 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 1 - lib/Sema/SemaDeclObjC.cpp | 5 +---- test/Misc/warning-flags.c | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 49e37faae7..944eca64ba 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 618c9d99e1..e52f7435a3 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(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 3293e02a44..57da3f9c9e 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 -- 2.40.0