diff options
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}} } |