From 0947b4e6c778ca94bbd0a56548de0b6b5ff1dfc9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 24 Nov 2008 01:28:17 +0000 Subject: 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 --- test/Analysis/CheckNSError.m | 8 ++++---- test/Sema/decl-invalid.c | 4 ++-- test/Sema/vla.c | 2 +- test/SemaObjC/string.m | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/Analysis/CheckNSError.m b/test/Analysis/CheckNSError.m index c6d846ef44..241c68cd85 100644 --- a/test/Analysis/CheckNSError.m +++ b/test/Analysis/CheckNSError.m @@ -20,8 +20,8 @@ extern NSString * const NSXMLParserErrorDomain ; @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 @@ extern NSString * const NSXMLParserErrorDomain ; 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 b92146260e..767d6e6ab4 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 __mbstate_t; // expected-error: {{declaration of anonymous union must be a definition}} +typedef union __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 cd57eac9a4..682d2fb266 100644 --- a/test/Sema/vla.c +++ b/test/Sema/vla.c @@ -14,5 +14,5 @@ void f (unsigned int m) } // 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 e3974ad8f6..e14d3b15c1 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}} -- cgit v1.2.1