diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-22 23:05:39 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-22 23:05:39 +0000 |
commit | 4a6dad68a30e0848bb013f745404fdf1683c3205 (patch) | |
tree | f4677364d8f3fad5ac25a66d11235bcc249b3df0 /clang/test/Parser/cxx-ambig-paren-expr.cpp | |
parent | 5ce0f0eccfe267dea170e60e2f1aca2df257dd5a (diff) | |
download | bcm5719-llvm-4a6dad68a30e0848bb013f745404fdf1683c3205.tar.gz bcm5719-llvm-4a6dad68a30e0848bb013f745404fdf1683c3205.zip |
Add a test case to make sure that an ambiguous paren expression is only parsed once.
llvm-svn: 72298
Diffstat (limited to 'clang/test/Parser/cxx-ambig-paren-expr.cpp')
-rw-r--r-- | clang/test/Parser/cxx-ambig-paren-expr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Parser/cxx-ambig-paren-expr.cpp b/clang/test/Parser/cxx-ambig-paren-expr.cpp index c054164e750..00695612562 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 @@ 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}} } |