Rewrite FindDiagnostics to be more strict about the formatting of the 
expected-foo strings.  Now the only allowed characters between 
expected-error and {{  is whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59925 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/CheckNSError.m b/test/Analysis/CheckNSError.m
index c6d846e..241c68c 100644
--- a/test/Analysis/CheckNSError.m
+++ b/test/Analysis/CheckNSError.m
@@ -20,8 +20,8 @@
 @end
 
 @implementation A
-- (void)myMethodWhichMayFail:(NSError **)error {   // expected-warning: {{Method accepting NSError** should have a non-void return value to indicate whether or not an error occured.}}
-  *error = [NSError errorWithDomain:@"domain" code:1 userInfo:0]; // expected-warning: {{Potential null dereference.}}
+- (void)myMethodWhichMayFail:(NSError **)error {   // expected-warning {{Method accepting NSError** should have a non-void return value to indicate whether or not an error occured.}}
+  *error = [NSError errorWithDomain:@"domain" code:1 userInfo:0]; // expected-warning {{Potential null dereference.}}
 }
 
 - (BOOL)myMethodWhichMayFail2:(NSError **)error {  // no-warning
@@ -33,8 +33,8 @@
 struct __CFError {};
 typedef struct __CFError* CFErrorRef;
 
-void foo(CFErrorRef* error) { // expected-warning{{Function accepting CFErrorRef* should have a non-void return value to indicate whether or not an error occured.}}
-  *error = 0;  // expected-warning{{Potential null dereference.}}
+void foo(CFErrorRef* error) { // expected-warning {{Function accepting CFErrorRef* should have a non-void return value to indicate whether or not an error occured.}}
+  *error = 0;  // expected-warning {{Potential null dereference.}}
 }
 
 int bar(CFErrorRef* error) {
diff --git a/test/Sema/decl-invalid.c b/test/Sema/decl-invalid.c
index b921462..767d6e6 100644
--- a/test/Sema/decl-invalid.c
+++ b/test/Sema/decl-invalid.c
@@ -1,11 +1,11 @@
 // RUN: clang %s -fsyntax-only -verify
 
-typedef union <anonymous> __mbstate_t;  // expected-error: {{declaration of anonymous union must be a definition}}
+typedef union <anonymous> __mbstate_t;  // expected-error {{declaration of anonymous union must be a definition}}
 
 
 // PR2017
 void x(); 
 int a() {
-  int r[x()];  // expected-error: {{size of array has non-integer type 'void'}}
+  int r[x()];  // expected-error {{size of array has non-integer type 'void'}}
 }
 
diff --git a/test/Sema/vla.c b/test/Sema/vla.c
index cd57eac..682d2fb 100644
--- a/test/Sema/vla.c
+++ b/test/Sema/vla.c
@@ -14,5 +14,5 @@
 }
 
 // PR3048
-int x = sizeof(struct{char qq[x];}); // expected-error {{fields must have a constant size}
+int x = sizeof(struct{char qq[x];}); // expected-error {{fields must have a constant size}}
 
diff --git a/test/SemaObjC/string.m b/test/SemaObjC/string.m
index e3974ad..e14d3b1 100644
--- a/test/SemaObjC/string.m
+++ b/test/SemaObjC/string.m
@@ -11,5 +11,5 @@
 
 id s = @"123"; // simple
 id t = @"123" @"456"; // concat
-id u = @"123" @ blah; // expected-error: {{unexpected token}}
+id u = @"123" @ blah; // expected-error {{unexpected token}}