Several name lookup conflict detection fixes involving objective-c names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43000 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
new file mode 100644
index 0000000..dd48ba4
--- /dev/null
+++ b/test/Sema/check-dup-objc-decls-1.m
@@ -0,0 +1,29 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface Foo // expected-error {{previous definition is here}}
+@end
+
+float Foo;	// expected-error {{redefinition of 'Foo' as different kind of symbol}}
+
+@class Bar;  // expected-error {{previous definition is here}}
+
+typedef int Bar;  // expected-error {{redefinition of 'Bar' as different kind of symbol}}
+
+@implementation FooBar // expected-warning {{cannot find interface declaration for 'FooBar'}} 
+@end
+
+
+typedef int OBJECT; // expected-error {{previous definition is here}}
+
+@class OBJECT ;	// expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
+
+
+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}}
+
+void Gorf() // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
+{
+	int Bar, Foo, FooBar;
+}