[cfe-commits] r101982 - /cfe/trunk/include/clang/AST/ExprObjC.h
Douglas Gregor
dgregor at apple.com
Tue Apr 20 21:17:28 PDT 2010
Thanks
Sent from my iPhone
On Apr 20, 2010, at 7:20 PM, John McCall <rjmccall at apple.com> wrote:
> Author: rjmccall
> Date: Tue Apr 20 21:20:33 2010
> New Revision: 101982
>
> URL: http://llvm.org/viewvc/llvm-project?rev=101982&view=rev
> Log:
> Use const_cast instead of a C cast. Safer, plus it suppresses a gcc
> warning.
>
>
> Modified:
> cfe/trunk/include/clang/AST/ExprObjC.h
>
> Modified: cfe/trunk/include/clang/AST/ExprObjC.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=101982&r1=101981&r2=101982&view=diff
> ===
> ===
> ===
> =====================================================================
> --- cfe/trunk/include/clang/AST/ExprObjC.h (original)
> +++ cfe/trunk/include/clang/AST/ExprObjC.h Tue Apr 20 21:20:33 2010
> @@ -706,8 +706,12 @@
>
> arg_iterator arg_begin() { return getArgs(); }
> arg_iterator arg_end() { return getArgs() + NumArgs; }
> - const_arg_iterator arg_begin() const { return (Stmt **)getArgs(); }
> - const_arg_iterator arg_end() const { return (Stmt **)getArgs() +
> NumArgs; }
> + const_arg_iterator arg_begin() const {
> + return const_cast<Stmt**>(getArgs());
> + }
> + const_arg_iterator arg_end() const {
> + return const_cast<Stmt**>(getArgs()) + NumArgs;
> + }
> };
>
> /// ObjCSuperExpr - Represents the "super" expression in Objective-C,
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list