[cfe-commits] [PATCH 2/2] Fix Casting

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jan 9 09:26:22 PST 2013


Could you have your patches be attached and not inlined in the email message ?

On Jan 8, 2013, at 1:49 PM, David Greene <dag at cray.com> wrote:

> Use const_cast<> to avoid a cast-away-const error.
> ---
> .../tools/clang/tools/libclang/IndexingContext.cpp |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/llvm/tools/clang/tools/libclang/IndexingContext.cpp b/llvm/tools/clang/tools/libclang/IndexingContext.cpp
> index e4c33b6..680eb52 100644
> --- a/llvm/tools/clang/tools/libclang/IndexingContext.cpp
> +++ b/llvm/tools/clang/tools/libclang/IndexingContext.cpp
> @@ -894,7 +894,7 @@ void IndexingContext::translateLoc(SourceLocation Loc,
>   if (indexFile)
>     *indexFile = getIndexFile(FE);
>   if (file)
> -    *file = (void *)FE;
> +    *file = const_cast<FileEntry *>(FE);
>   if (line)
>     *line = SM.getLineNumber(FID, FileOffset);
>   if (column)
> -- 
> 1.7.8.4
> 
> _______________________________________________
> 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