[cfe-commits] r142142 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Richard Smith richard at metafoo.co.uk
Sun Oct 16 13:12:04 PDT 2011


On Sun, October 16, 2011 19:19, Sebastian Redl wrote:
> Author: cornedbee
> Date: Sun Oct 16 13:18:59 2011
> New Revision: 142142
>
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142142&view=rev
> Log:
> Make a C-style cast a const-cast, to suppress a GCC warning. I should fix the
> underlying issue eventually, but this interface will probably change anyway.
>
> Modified:
> cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiat
> eDecl.cpp?rev=142142&r1=142141&r2=142142&view=diff
> =============================================================================
> =
> --- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Sun Oct 16 13:18:59
> 2011
> @@ -2691,7 +2691,7 @@
> // the MultiInitializer.
> if (Args.size() == 1 && isa<InitListExpr>(Args[0])) return
> MultiInitializer(Args[0]);
> -  return MultiInitializer(Init->getLParenLoc(), Args.data(),
> +  return MultiInitializer(Init->getLParenLoc(),
> const_cast<Expr**>(Args.data()), Args.size(), Init->getRParenLoc());
> }

Please revert. The const-correctness issue (and GCC warning) was fixed in
r141496 and no cast is necessary here any more.




More information about the cfe-commits mailing list