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 | f303e8a0b13a5059a0a8fb3de8609b2f45a40562 (patch) | |
tree | a451a5ca2e4e429a6891b5b88fe378144d3175d8 /test/Parser/cxx-ambig-paren-expr.cpp | |
parent | 02fd8ddba96a529c5868162a13f7bb2c5e36d522 (diff) |
Add a test case to make sure that an ambiguous paren expression is only parsed once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-ambig-paren-expr.cpp')
-rw-r--r-- | test/Parser/cxx-ambig-paren-expr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/Parser/cxx-ambig-paren-expr.cpp b/test/Parser/cxx-ambig-paren-expr.cpp index c054164e75..0069561256 100644 --- a/test/Parser/cxx-ambig-paren-expr.cpp +++ b/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}} } |