From 469e73035c745f39edf7fe882edb09c06559e581 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 14 Jan 2013 18:58:38 +0000 Subject: [PATCH] [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 --- .../clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.40.0