diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-13 00:10:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-13 00:10:38 +0000 |
commit | 1721a2dfc05d081e76d6dd4755d52c96e093dabc (patch) | |
tree | 36ea61c84a64f319b6fc69a194ccfc27a1dbcf8c /test/Parser/expressions.c | |
parent | 16ede0ec39bf72f5e696e8ed5f1533b29ac2f3d8 (diff) |
Improve error recovery for calls, fixing:
PR3972: Poor diagnostic with missing ')'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/expressions.c')
-rw-r--r-- | test/Parser/expressions.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c index 3f58ef3d51..2b4d4636eb 100644 --- a/test/Parser/expressions.c +++ b/test/Parser/expressions.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -parse-noop %s +// RUN: clang-cc -parse-noop -verify %s void test1() { if (sizeof (int){ 1}); // sizeof compound literal @@ -41,3 +41,10 @@ int test_leading_extension() { __extension__ (*(char*)0) = 1; } +// PR3972 +int test5(int); +int test6(void) { + return test5( // expected-note {{to match}} + test5(1) + ; // expected-error {{expected ')'}} +} |