[Lldb-commits] [PATCH] TypeSynthetic: Fix a pointer-to-function to void-pointer cast
Enrico Granata
egranata at apple.com
Tue Jul 22 13:44:50 PDT 2014
LGTM
> On Jul 22, 2014, at 1:36 PM, David Majnemer <david.majnemer at gmail.com> wrote:
>
> 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();
> <D4627.11779.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list