The checking for the delimiters of expected error/warning messages was
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44326 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/DiagChecker.cpp b/Driver/DiagChecker.cpp
index 8daaa6c..81d3e1b 100644
--- a/Driver/DiagChecker.cpp
+++ b/Driver/DiagChecker.cpp
@@ -57,7 +57,7 @@
     ColNo = Comment.find(ExpectedStr, ColNo);
     if (ColNo == std::string::npos) break;
 
-    size_type OpenDiag = Comment.find_first_of("{{", ColNo);
+    size_type OpenDiag = Comment.find("{{", ColNo);
 
     if (OpenDiag == std::string::npos) {
       fprintf(stderr,
@@ -67,7 +67,7 @@
     }
 
     OpenDiag += 2;
-    size_type CloseDiag = Comment.find_first_of("}}", OpenDiag);
+    size_type CloseDiag = Comment.find("}}", OpenDiag);
 
     if (CloseDiag == std::string::npos) {
       fprintf(stderr,
diff --git a/test/Analysis/uninit-vals.c b/test/Analysis/uninit-vals.c
index ccd048f..041c946 100644
--- a/test/Analysis/uninit-vals.c
+++ b/test/Analysis/uninit-vals.c
@@ -2,19 +2,19 @@
 
 int f1() {
   int x;
-  return x; // expected-warning{use of uninitialized variable}
+  return x; // expected-warning {{use of uninitialized variable}}
 }
 
 int f2(int x) {
   int y;
-  int z = x + y; // expected-warning {use of uninitialized variable}
+  int z = x + y; // expected-warning {{use of uninitialized variable}}
   return z;
 }
 
 
 int f3(int x) {
   int y;
-  return x ? 1 : y; // expected-warning {use of uninitialized variable}
+  return x ? 1 : y; // expected-warning {{use of uninitialized variable}}
 }
 
 int f4(int x) {
@@ -31,7 +31,7 @@
 void f6(int i) {
   int x;
   for (i = 0 ; i < 10; i++)
-    printf("%d",x++); // expected-warning {use of uninitialized variable}
+    printf("%d",x++); // expected-warning {{use of uninitialized variable}}
 }
 
 void f7(int i) {
@@ -39,6 +39,6 @@
   int y;
   for (i = 0; i < 10; i++ ) {
     printf("%d",x++); // no-warning
-    x += y; // expected-warning {use of uninitialized variable}
+    x += y; // expected-warning {{use of uninitialized variable}}
   }
-}
\ No newline at end of file
+}
diff --git a/test/Lexer/cxx0x_keyword.cpp b/test/Lexer/cxx0x_keyword.cpp
index dd889a1..d55649c 100644
--- a/test/Lexer/cxx0x_keyword.cpp
+++ b/test/Lexer/cxx0x_keyword.cpp
@@ -1,2 +1,2 @@
 // RUN: clang -fsyntax-only -verify -std=c++0x %s 2>&1
-int static_assert; /* expected-error {{expected identifier or '('}}} */
+int static_assert; /* expected-error {{expected identifier or '('}} */
diff --git a/test/Sema/cfstring.c b/test/Sema/cfstring.c
index d4a8552..5c815d0 100644
--- a/test/Sema/cfstring.c
+++ b/test/Sema/cfstring.c
@@ -2,9 +2,9 @@
 
 // RUN: clang %s -fsyntax-only -verify
 void f() {
-  CFSTR("\242"); // expected-warning { CFString literal contains non-ASCII character }
-  CFSTR("\0"); // expected-warning { CFString literal contains NUL character }
-  CFSTR(242); // expected-error { error: CFString literal is not a string constant } \
-  expected-warning { incompatible types }
-  CFSTR("foo", "bar"); // expected-error { error: too many arguments to function }
+  CFSTR("\242"); // expected-warning {{ CFString literal contains non-ASCII character }}
+  CFSTR("\0"); // expected-warning {{ CFString literal contains NUL character }}
+  CFSTR(242); // expected-error {{ CFString literal is not a string constant }} \
+    expected-warning {{incompatible types}}
+  CFSTR("foo", "bar"); // expected-error {{ error: too many arguments to function }}
 }
diff --git a/test/Sema/class-def-test-1.m b/test/Sema/class-def-test-1.m
index 91de54f..94a01cc 100644
--- a/test/Sema/class-def-test-1.m
+++ b/test/Sema/class-def-test-1.m
@@ -12,7 +12,7 @@
 
 @interface INTF1 : OBJECT @end
 
-@interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}
+@interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}}
 
 typedef int OBJECT; // expected-error {{previous definition is here}}  \
 		       expected-error {{redefinition of 'OBJECT' as different kind of symbol}}