Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.
I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/check-dup-objc-decls-1.m b/test/Sema/check-dup-objc-decls-1.m
index dd48ba4..e3902bd 100644
--- a/test/Sema/check-dup-objc-decls-1.m
+++ b/test/Sema/check-dup-objc-decls-1.m
@@ -20,8 +20,7 @@
typedef int Gorf; // expected-error {{previous definition is here}}
-@interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}} \
- // expected-error {{previous definition is here}}
+@interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
void Gorf() // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
{