From: Jordan Rose Date: Mon, 14 Jan 2013 18:58:38 +0000 (+0000) Subject: [analyzer] Fix cast-away-const warning by using const_cast. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=469e73035c745f39edf7fe882edb09c06559e581;p=clang [analyzer] Fix cast-away-const warning by using const_cast. Patch by David Greene, modified by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172445 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h index 851cafb52c..34f450f4fb 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h @@ -167,7 +167,7 @@ namespace ento { } static inline void *MakeVoidPtr(data_type D) { - return (void*) D.getInternalPointer(); + return const_cast >(D.getInternalPointer()); } static inline context_type MakeContext(void *p) {