Add a test case to make sure that an ambiguous paren expression is only parsed once.
llvm-svn: 72298
diff --git a/clang/test/Parser/cxx-ambig-paren-expr.cpp b/clang/test/Parser/cxx-ambig-paren-expr.cpp
index c054164..0069561 100644
--- a/clang/test/Parser/cxx-ambig-paren-expr.cpp
+++ b/clang/test/Parser/cxx-ambig-paren-expr.cpp
@@ -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 @@
// 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}}
}