[cfe-commits] r106216 - in /cfe/trunk: include/clang/AST/TypeLoc.h include/clang/Lex/Token.h lib/Sema/SemaExprCXX.cpp
John McCall
rjmccall at apple.com
Thu Jun 17 10:04:33 PDT 2010
On Jun 17, 2010, at 4:29 AM, Gabor Greif wrote:
> Author: ggreif
> Date: Thu Jun 17 06:29:31 2010
> New Revision: 106216
>
> URL: http://llvm.org/viewvc/llvm-project?rev=106216&view=rev
> Log:
> fix some more gcc3.4 constness warnings
>
> Modified:
> cfe/trunk/include/clang/AST/TypeLoc.h
> cfe/trunk/include/clang/Lex/Token.h
> cfe/trunk/lib/Sema/SemaExprCXX.cpp
>
> Modified: cfe/trunk/include/clang/AST/TypeLoc.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=106216&r1=106215&r2=106216&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/AST/TypeLoc.h (original)
> +++ cfe/trunk/include/clang/AST/TypeLoc.h Thu Jun 17 06:29:31 2010
> @@ -142,7 +142,7 @@
>
> /// \brief Return the TypeLoc for a type source info.
> inline TypeLoc TypeSourceInfo::getTypeLoc() const {
> - return TypeLoc(Ty, (void*)(this + 1));
> + return TypeLoc(Ty, const_cast<TypeSourceInfo*>(this + 1));
> }
Please make this const_cast<void*>; right now it looks *really* bizarre.
John.
More information about the cfe-commits
mailing list