[cfe-commits] r72298 - /cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp

Douglas Gregor dgregor at apple.com
Fri May 22 16:14:46 PDT 2009


On May 22, 2009, at 4:05 PM, Argiris Kirtzidis wrote:

> Author: akirtzidis
> Date: Fri May 22 18:05:39 2009
> New Revision: 72298
>
> URL: http://llvm.org/viewvc/llvm-project?rev=72298&view=rev
> Log:
> Add a test case to make sure that an ambiguous paren expression is  
> only parsed once.
>
> Modified:
>    cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp
>
> Modified: cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp?rev=72298&r1=72297&r2=72298&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp (original)
> +++ cfe/trunk/test/Parser/cxx-ambig-paren-expr.cpp Fri May 22  
> 18:05:39 2009
> @@ -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}}
> }

Excellent. Thanks!

	- Doug



More information about the cfe-commits mailing list