[Lldb-commits] [PATCH] Have lldb_assert accept bool expressions
Enrico Granata
granata.enrico at gmail.com
Thu May 7 09:03:22 PDT 2015
LGTM
- Enrico
Sent from my iPhone
> On May 7, 2015, at 8:15 AM, Pavel Labath <labath at google.com> wrote:
>
> Hi granata.enrico, zturner,
>
> This changes lldb_assert to accept bool expressions as the parameter, this is because some
> objects (such as std::shared_ptr) are convertible to bool, but are not convertible to int, which
> leads to surprising errors.
>
> http://reviews.llvm.org/D9565
>
> Files:
> include/lldb/Utility/LLDBAssert.h
> source/Utility/LLDBAssert.cpp
>
> Index: include/lldb/Utility/LLDBAssert.h
> ===================================================================
> --- include/lldb/Utility/LLDBAssert.h
> +++ include/lldb/Utility/LLDBAssert.h
> @@ -20,7 +20,7 @@
>
> namespace lldb_private {
> void
> - lldb_assert (int expression,
> + lldb_assert (bool expression,
> const char* expr_text,
> const char* func,
> const char* file,
> Index: source/Utility/LLDBAssert.cpp
> ===================================================================
> --- source/Utility/LLDBAssert.cpp
> +++ source/Utility/LLDBAssert.cpp
> @@ -17,7 +17,7 @@
> using namespace lldb_private;
>
> void
> -lldb_private::lldb_assert (int expression,
> +lldb_private::lldb_assert (bool expression,
> const char* expr_text,
> const char* func,
> const char* file,
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
> <D9565.25191.patch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150507/53946664/attachment.html>
More information about the lldb-commits
mailing list