A bunch-o changes to fix <rdar://problem/5716046> incomplete implementation of ObjC class warning is incomplete

As part of this fix, I made a low-level change to the text diagnostics machinery (to basically avoid printing duplicate source lines/carets when you have multiple diagnostics that refer to the same exact place). For now, this only happens with we don't have a source range (could be extended to support source ranges as well). 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/method-undefined-warn-1.m b/test/Sema/method-undefined-warn-1.m
index 0e4e6a1..9e646f8 100644
--- a/test/Sema/method-undefined-warn-1.m
+++ b/test/Sema/method-undefined-warn-1.m
@@ -3,12 +3,12 @@
 @interface INTF
 - (void) meth;
 - (void) meth : (int) arg1;
-- (int)  int_meth;	// expected-warning {{method definition for 'int_meth' not found}}
-+ (int) cls_meth;	// expected-warning {{method definition for 'cls_meth' not found}}
-+ (void) cls_meth1 : (int) arg1; // expected-warning {{method definition for 'cls_meth1:' not found}}
+- (int)  int_meth; 
++ (int) cls_meth;
++ (void) cls_meth1 : (int) arg1; 
 @end
 
-@implementation INTF 	// expected-warning {{incomplete implementation of class 'INTF'}}
+@implementation INTF 	// expected-warning {{incomplete implementation}} expected-warning {{method definition for 'int_meth' not found}} expected-warning {{method definition for 'cls_meth' not found}} expected-warning {{method definition for 'cls_meth1:' not found}}
 - (void) meth {}
 - (void) meth : (int) arg2{}
 - (void) cls_meth1 : (int) arg2{}
@@ -17,12 +17,12 @@
 @interface INTF1
 - (void) meth;
 - (void) meth : (int) arg1;
-- (int)  int_meth;      // expected-warning {{method definition for 'int_meth' not found}}
-+ (int) cls_meth;       // expected-warning {{method definition for 'cls_meth' not found}}
-+ (void) cls_meth1 : (int) arg1; // expected-warning {{method definition for 'cls_meth1:' not found}}
+- (int)  int_meth;      
++ (int) cls_meth;       
++ (void) cls_meth1 : (int) arg1; 
 @end
 
-@implementation INTF1 // expected-warning {{incomplete implementation of class 'INTF1'}}
+@implementation INTF1 // expected-warning {{incomplete implementation}} expected-warning {{method definition for 'int_meth' not found}} expected-warning {{method definition for 'cls_meth' not found}} expected-warning {{method definition for 'cls_meth1:' not found}}
 - (void) meth {}
 - (void) meth : (int) arg2{}
 - (void) cls_meth1 : (int) arg2{}