[cfe-commits] r59922 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/SemaDeclObjC.cpp test/SemaObjC/alias-test-1.m
Chris Lattner
sabre at nondot.org
Sun Nov 23 15:20:13 PST 2008
Author: lattner
Date: Sun Nov 23 17:20:13 2008
New Revision: 59922
URL: http://llvm.org/viewvc/llvm-project?rev=59922&view=rev
Log:
remove warn_previous_declaration
Modified:
cfe/trunk/include/clang/Basic/DiagnosticKinds.def
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/test/SemaObjC/alias-test-1.m
Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=59922&r1=59921&r2=59922&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Sun Nov 23 17:20:13 2008
@@ -504,8 +504,6 @@
"cannot find definition of 'Class'")
DIAG(warn_previous_alias_decl, WARNING,
"previously declared alias is ignored")
-DIAG(warn_previous_declaration, WARNING,
- "previous declaration is here")
DIAG(err_conflicting_aliasing_type, ERROR,
"conflicting types for alias %0")
DIAG(err_statically_allocated_object, ERROR,
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=59922&r1=59921&r2=59922&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sun Nov 23 17:20:13 2008
@@ -143,14 +143,11 @@
// Look for previous declaration of alias name
Decl *ADecl = LookupDecl(AliasName, Decl::IDNS_Ordinary, TUScope);
if (ADecl) {
- if (isa<ObjCCompatibleAliasDecl>(ADecl)) {
+ if (isa<ObjCCompatibleAliasDecl>(ADecl))
Diag(AliasLocation, diag::warn_previous_alias_decl);
- Diag(ADecl->getLocation(), diag::warn_previous_declaration);
- }
- else {
+ else
Diag(AliasLocation, diag::err_conflicting_aliasing_type) << AliasName;
- Diag(ADecl->getLocation(), diag::note_previous_declaration);
- }
+ Diag(ADecl->getLocation(), diag::note_previous_declaration);
return 0;
}
// Check for class declaration
@@ -159,7 +156,7 @@
if (CDecl == 0) {
Diag(ClassLocation, diag::warn_undef_interface) << ClassName;
if (CDeclU)
- Diag(CDeclU->getLocation(), diag::warn_previous_declaration);
+ Diag(CDeclU->getLocation(), diag::note_previous_declaration);
return 0;
}
Modified: cfe/trunk/test/SemaObjC/alias-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/alias-test-1.m?rev=59922&r1=59921&r2=59922&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/alias-test-1.m (original)
+++ cfe/trunk/test/SemaObjC/alias-test-1.m Sun Nov 23 17:20:13 2008
@@ -5,7 +5,7 @@
@class class2; // expected-note {{previous declaration is here}}
@class class3;
-typedef int I; // expected-warning {{previous declaration is here}}
+typedef int I; // expected-note {{previous declaration is here}}
@compatibility_alias alias1 I; // expected-warning {{cannot find interface declaration for 'I'}}
More information about the cfe-commits
mailing list