aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/expressions.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-04-06 02:35:25 +0000
committerJohn McCall <rjmccall@apple.com>2011-04-06 02:35:25 +0000
commitb3c4906aa62ebe72836f95c9d8306280a5bc6ad0 (patch)
tree440371bd57bd6465e0a5968c1fa9e3a4a9ad6d2d /test/Parser/expressions.c
parent77ebb3829f2abb9be2d40927b793b72347626aad (diff)
Diagnose a missing ')' on what looks like a statement expression.
A situation where we can get an invalid ExprResult without an error. Fixes PR8394. Patch by Justin Bogner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/expressions.c')
-rw-r--r--test/Parser/expressions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c
index 6015e918a3..0d1b6c945c 100644
--- a/test/Parser/expressions.c
+++ b/test/Parser/expressions.c
@@ -51,3 +51,9 @@ int test6(void) {
test5(1)
; // expected-error {{expected ')'}}
}
+
+// PR8394
+void test7() {
+ ({} // expected-note {{to match}}
+ ; // expected-error {{expected ')'}}
+}