Patch for 1) Checking for duplicate methods decls in intterface and category.
2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42641 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/check-dup-decl-methods-1.m b/test/Sema/check-dup-decl-methods-1.m
new file mode 100644
index 0000000..1012900
--- /dev/null
+++ b/test/Sema/check-dup-decl-methods-1.m
@@ -0,0 +1,32 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface SUPER
+- (int) meth;
++ (int) foobar;
+@end
+
+@interface T @end
+
+@interface class1 : SUPER
+- (int) meth;	// expected-error {{previous declaration is here}}
+- (int*) meth;	// expected-error {{duplicate declaration of method 'meth'}}
+- (T*) meth1;  
+- (T*) meth1;
++ (T*) meth1;
+@end
+
+@interface class1(cat)
+- (int) catm : (char)ch1; // expected-error {{previous declaration is here}}
+- (int) catm1 : (char)ch : (int)i;
+- (int) catm : (char*)ch1; // expected-error {{duplicate declaration of method 'catm:'}}
++ (int) catm1 : (char)ch : (int)i;
++ (T*) meth1;
+@end
+
+@interface class1(cat1)
++ (int) catm1 : (char)ch : (int)i; // expected-error {{previous declaration is here}}
++ (T*) meth1; // expected-error {{previous declaration is here}}
++ (int) catm1 : (char)ch : (int*)i; // expected-error {{duplicate declaration of method 'catm1::'}}
++ (T**) meth1; // expected-error {{duplicate declaration of method 'meth1'}}
++ (int) foobar;
+@end