diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:12:48 +0000 |
| commit | 0883ccd9eac3b974df00e6548ee319a7dd3646f4 (patch) | |
| tree | d6a70c3518b8dea8be7062438d7e8676820ed17f /test/Misc | |
| parent | 60bfabcd8ce617297c0d231f77d14ab507e98796 (diff) | |
Notes
Diffstat (limited to 'test/Misc')
| -rw-r--r-- | test/Misc/message-length.c | 16 | ||||
| -rw-r--r-- | test/Misc/tabstop.c | 3 | ||||
| -rw-r--r-- | test/Misc/verify.c | 14 |
3 files changed, 27 insertions, 6 deletions
diff --git a/test/Misc/message-length.c b/test/Misc/message-length.c index 3c746052fd3c..3e69b6a206ee 100644 --- a/test/Misc/message-length.c +++ b/test/Misc/message-length.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s -// RUN: %clang_cc1 -fmessage-length 1 %s - +// RUN: not %clang_cc1 -fmessage-length 72 %s 2>&1 | FileCheck -strict-whitespace %s +// RUN: not %clang_cc1 -fmessage-length 1 %s +// RUN: not %clang_cc1 -fmessage-length 8 %s 2>&1 | FileCheck -check-prefix=CHECK-DOT %s // Hack so we can check things better, force the file name and line. # 1 "FILE" 1 @@ -30,3 +30,13 @@ void a_very_long_line(int *ip, float *FloatPointer) { // CHECK: FILE:23:78 // CHECK: {{^ ...// some long comment text and a brace, eh {} }} + +struct A { int x; }; +void h(struct A *a) { + // CHECK-DOT: member + // CHECK-DOT: reference + // CHECK-DOT: type + (void)a + . + x; +} diff --git a/test/Misc/tabstop.c b/test/Misc/tabstop.c index 66685c62d15a..49c4d7bebbba 100644 --- a/test/Misc/tabstop.c +++ b/test/Misc/tabstop.c @@ -39,12 +39,9 @@ void f(void) // CHECK-3: {{^ }}if (0 & 1 == 1) // CHECK-3: {{^ }} ( ) -// CHECK-3: {{^ }} ( ) // CHECK-4: {{^ }}if (0 & 1 == 1) // CHECK-4: {{^ }} ( ) -// CHECK-4: {{^ }} ( ) // CHECK-5: {{^ }}if (0 & 1 == 1) // CHECK-5: {{^ }} ( ) -// CHECK-5: {{^ }} ( ) diff --git a/test/Misc/verify.c b/test/Misc/verify.c new file mode 100644 index 000000000000..85b034e95724 --- /dev/null +++ b/test/Misc/verify.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +struct s; // expected-note 7 {{forward declaration of 'struct s'}} + +// standard string matching +struct s s1; // expected-error {{tentative definition has type 'struct s' that is never completed}} +struct s s2; // expected-error {{tentative definition has type}} + +// regex matching +struct s r1; // expected-error-re {{tentative definition has type 'struct s' that is never completed}} +struct s r2; // expected-error-re {{tentative definition has type '.*[[:space:]]*.*' that is never completed}} +struct s r3; // expected-error-re {{tentative definition has type '(.*)[[:space:]]*(.*)' that is never completed}} +struct s r4; // expected-error-re {{^tentative}} +struct s r5; // expected-error-re {{completed$}} |
