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