summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-03 19:26:08 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-03 19:26:08 +0000
commitd5a36321b91150206c35eb691cbb646dd3fc74c4 (patch)
treef8e43a09cc7e5cb74b9e9b29fb44a1074087a104 /clang/test
parentcde8de519d429f65efc0279dfd5b35d045d6a9e7 (diff)
downloadbcm5719-llvm-d5a36321b91150206c35eb691cbb646dd3fc74c4.tar.gz
bcm5719-llvm-d5a36321b91150206c35eb691cbb646dd3fc74c4.zip
Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for these cases). Remove some excess diagnostics arising during parse failures. llvm-svn: 85924
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Lexer/block_cmt_end.c4
-rw-r--r--clang/test/Sema/decl-invalid.c3
-rw-r--r--clang/test/Sema/init.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/clang/test/Lexer/block_cmt_end.c b/clang/test/Lexer/block_cmt_end.c
index d85cf81f214..83d6cf18924 100644
--- a/clang/test/Lexer/block_cmt_end.c
+++ b/clang/test/Lexer/block_cmt_end.c
@@ -17,7 +17,7 @@ next comment ends with normal escaped newline:
/* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\
/
-int bar
+int bar /* expected-error {{invalid token after top level declarator}} */
/* xyz
@@ -26,7 +26,7 @@ next comment ends with a trigraph escaped newline: */
/* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/
/
-foo /* expected-error {{invalid token after top level declarator}} */
+foo
// rdar://6060752 - We should not get warnings about trigraphs in comments:
diff --git a/clang/test/Sema/decl-invalid.c b/clang/test/Sema/decl-invalid.c
index 051f0f7ffbc..823551f02e6 100644
--- a/clang/test/Sema/decl-invalid.c
+++ b/clang/test/Sema/decl-invalid.c
@@ -10,8 +10,7 @@ int a() {
int r[x()]; // expected-error {{size of array has non-integer type 'void'}}
static y ?; // expected-error{{unknown type name 'y'}} \
- expected-error{{expected identifier or '('}} \
- expected-error{{expected ';' at end of declaration}}
+ expected-error{{expected identifier or '('}}
}
int; // expected-error {{declaration does not declare anything}}
diff --git a/clang/test/Sema/init.c b/clang/test/Sema/init.c
index 1cbcbb7e36f..840b24fd30b 100644
--- a/clang/test/Sema/init.c
+++ b/clang/test/Sema/init.c
@@ -21,7 +21,7 @@ int *h = &x;
int test() {
int a[10];
int b[10] = a; // expected-error {{initialization with '{...}' expected}}
-int +; // expected-error {{expected identifier or '('}} expected-error {{expected ';' at end of declaration}}
+int +; // expected-error {{expected identifier or '('}}
}
OpenPOWER on IntegriCloud