[Lldb-commits] [PATCH] TypeSynthetic: Fix a pointer-to-function to void-pointer cast
David Majnemer
david.majnemer at gmail.com
Tue Jul 22 13:36:17 PDT 2014
Hi zturner, tfiala,
reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
http://reviews.llvm.org/D4627
Files:
source/DataFormatters/TypeSynthetic.cpp
Index: source/DataFormatters/TypeSynthetic.cpp
===================================================================
--- source/DataFormatters/TypeSynthetic.cpp
+++ source/DataFormatters/TypeSynthetic.cpp
@@ -57,7 +57,7 @@
Cascades() ? "" : " (not cascading)",
SkipsPointers() ? " (skip pointers)" : "",
SkipsReferences() ? " (skip references)" : "",
- reinterpret_cast<void*>(m_create_callback),
+ reinterpret_cast<void*>(reinterpret_cast<intptr_t>(m_create_callback)),
m_description.c_str());
return sstr.GetString();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4627.11779.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140722/0bf84bd9/attachment.bin>
More information about the lldb-commits
mailing list