[cfe-commits] r172445 - /cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h

Jordan Rose jordan_rose at apple.com
Mon Jan 14 10:58:38 PST 2013


Author: jrose
Date: Mon Jan 14 12:58:38 2013
New Revision: 172445

URL: http://llvm.org/viewvc/llvm-project?rev=172445&view=rev
Log:
[analyzer] Fix cast-away-const warning by using const_cast.

Patch by David Greene, modified by me.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h?rev=172445&r1=172444&r2=172445&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h Mon Jan 14 12:58:38 2013
@@ -167,7 +167,7 @@
     }
 
     static inline void *MakeVoidPtr(data_type D) {
-      return  (void*) D.getInternalPointer();
+      return const_cast<llvm::ImmutableListImpl<T> >(D.getInternalPointer());
     }
 
     static inline context_type MakeContext(void *p) {





More information about the cfe-commits mailing list