[cfe-commits] r44326 - in /cfe/trunk: Driver/DiagChecker.cpp test/Analysis/uninit-vals.c test/Lexer/cxx0x_keyword.cpp test/Sema/cfstring.c test/Sema/class-def-test-1.m

Bill Wendling isanbard at gmail.com
Mon Nov 26 00:26:20 PST 2007


Author: void
Date: Mon Nov 26 02:26:20 2007
New Revision: 44326

URL: http://llvm.org/viewvc/llvm-project?rev=44326&view=rev
Log:
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.


Modified:
    cfe/trunk/Driver/DiagChecker.cpp
    cfe/trunk/test/Analysis/uninit-vals.c
    cfe/trunk/test/Lexer/cxx0x_keyword.cpp
    cfe/trunk/test/Sema/cfstring.c
    cfe/trunk/test/Sema/class-def-test-1.m

Modified: cfe/trunk/Driver/DiagChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/DiagChecker.cpp?rev=44326&r1=44325&r2=44326&view=diff

==============================================================================
--- cfe/trunk/Driver/DiagChecker.cpp (original)
+++ cfe/trunk/Driver/DiagChecker.cpp Mon Nov 26 02:26:20 2007
@@ -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,

Modified: cfe/trunk/test/Analysis/uninit-vals.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/uninit-vals.c?rev=44326&r1=44325&r2=44326&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/uninit-vals.c (original)
+++ cfe/trunk/test/Analysis/uninit-vals.c Mon Nov 26 02:26:20 2007
@@ -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
+}

Modified: cfe/trunk/test/Lexer/cxx0x_keyword.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Lexer/cxx0x_keyword.cpp?rev=44326&r1=44325&r2=44326&view=diff

==============================================================================
--- cfe/trunk/test/Lexer/cxx0x_keyword.cpp (original)
+++ cfe/trunk/test/Lexer/cxx0x_keyword.cpp Mon Nov 26 02:26:20 2007
@@ -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 '('}} */

Modified: cfe/trunk/test/Sema/cfstring.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/cfstring.c?rev=44326&r1=44325&r2=44326&view=diff

==============================================================================
--- cfe/trunk/test/Sema/cfstring.c (original)
+++ cfe/trunk/test/Sema/cfstring.c Mon Nov 26 02:26:20 2007
@@ -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 }}
 }

Modified: cfe/trunk/test/Sema/class-def-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/class-def-test-1.m?rev=44326&r1=44325&r2=44326&view=diff

==============================================================================
--- cfe/trunk/test/Sema/class-def-test-1.m (original)
+++ cfe/trunk/test/Sema/class-def-test-1.m Mon Nov 26 02:26:20 2007
@@ -12,7 +12,7 @@
 
 @interface INTF1 : OBJECT @end
 
- at interface INTF1 : OBJECT @end // expected-error {{duplicate interface declaration for class 'INTF1'}
+ at 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}}





More information about the cfe-commits mailing list