[cfe-commits] r62943 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def lib/Sema/SemaExpr.cpp test/Sema/stmt_exprs.c

Sebastian Redl sebastian.redl at getdesigned.at
Sat Jan 24 15:39:42 PST 2009


Eli Friedman wrote:
> +DIAG(err_stmtexpr_file_scope, ERROR,
> +     "statement expression not allowed at file scope")
>  
>  
> +  bool isFileScope = getCurFunctionOrMethodDecl() == 0;
> +  if (isFileScope) {
> +    return Diag(LPLoc, diag::err_stmtexpr_file_scope);
> +  }
> +
>  
> +// PR3062
> +int x[({10;})]; // expected-error {{illegal statement expression}}
>
>   
This looks like a mismatch between diagnostic text and test validation.
The test fails for me.

Sebastian



More information about the cfe-commits mailing list