[cfe-commits] r140546 - /cfe/trunk/lib/Sema/SemaInit.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Mon Sep 26 14:25:06 PDT 2011


On 26.09.2011, at 20:53, Eli Friedman wrote:

> Author: efriedma
> Date: Mon Sep 26 13:53:43 2011
> New Revision: 140546
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=140546&view=rev
> Log:
> Fix a typo in the new VerifyOnly handling in SemaInit.  No visible difference at the moment, as far as I can tell.
> 
> 
> Modified:
>    cfe/trunk/lib/Sema/SemaInit.cpp
> 
> Modified: cfe/trunk/lib/Sema/SemaInit.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=140546&r1=140545&r2=140546&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaInit.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaInit.cpp Mon Sep 26 13:53:43 2011
> @@ -1878,7 +1878,7 @@
>       = DesignatedEndIndex.extOrTrunc(MaxElements.getBitWidth());
>     DesignatedEndIndex.setIsUnsigned(MaxElements.isUnsigned());
>     if (DesignatedEndIndex >= MaxElements) {
> -      if (VerifyOnly)
> +      if (!VerifyOnly)
>         SemaRef.Diag(IndexExpr->getSourceRange().getBegin(),
>                       diag::err_array_designator_too_large)
>           << DesignatedEndIndex.toString(10) << MaxElements.toString(10)

No indeed - in fact, no error in this area will surface until I implement overload resolution for initializer list arguments.
Still, thank you for the catch.

Sebastian



More information about the cfe-commits mailing list