Add a test case to make sure that an ambiguous paren expression is only parsed once.

llvm-svn: 72298
This commit is contained in:
Argyrios Kyrtzidis 2009-05-22 23:05:39 +00:00
parent 5ce0f0eccf
commit 4a6dad68a3
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// RUN: clang-cc -fsyntax-only -verify %s
// RUN: clang-cc -fsyntax-only -pedantic -verify %s
void f() {
typedef int T;
@ -12,4 +12,8 @@ void f() {
// Expression.
x = (T());
x = (T())/x;
typedef int *PT;
// Make sure stuff inside the parens are parsed only once (only one warning).
x = (PT()[(int){1}]); // expected-warning {{compound literals}}
}