summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-24 01:28:17 +0000
committerChris Lattner <sabre@nondot.org>2008-11-24 01:28:17 +0000
commit0947b4e6c778ca94bbd0a56548de0b6b5ff1dfc9 (patch)
tree66b06cecd889df3d05c8dbddfb23ea6075ae8249 /test
parentb2c8c55d8161d6e8d91a8aed76b0e24a7d16984c (diff)
downloadclang-0947b4e6c778ca94bbd0a56548de0b6b5ff1dfc9.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/Analysis/CheckNSError.m8
-rw-r--r--test/Sema/decl-invalid.c4
-rw-r--r--test/Sema/vla.c2
-rw-r--r--test/SemaObjC/string.m2
4 files changed, 8 insertions, 8 deletions
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 <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 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}}