[PATCH] D49111: [windows] LLDB shows the wrong values when register read is executed at a frame other than zero

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 10 10:32:11 PDT 2018


I think this is a matter of opinion and the code is fine as is personally.
If you prefer the implicit cast, feel free to leave it.  This pattern is
already pervasive all over LLVM and clang, so you can treat it as a nit
(fix it if you agree, leave it if you prefer).

On Tue, Jul 10, 2018 at 9:57 AM Stella Stamenova via Phabricator <
reviews at reviews.llvm.org> wrote:

> stella.stamenova marked 8 inline comments as done.
> stella.stamenova added a comment.
>
> I made the requested changes and I'll update the revision once all the
> tests pass.
>
>
>
> ================
> Comment at:
> source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp:92
> +    Unwind *unwinder = GetUnwinder();
> +    if (unwinder)
> +      reg_ctx_sp = unwinder->CreateRegisterContextForFrame(frame);
> ----------------
> tatyana-krasnukha wrote:
> > aleksandr.urakov wrote:
> > > tatyana-krasnukha wrote:
> > > > Here you check plain pointer, don't cast it to bool - compare with
> nullptr.
> > > What are the disadvantages of casting to bool in comparison with
> nullptr checking?
> > That's a matter of opinion, but most coding styles consider implicit
> casts as less readable. E.g. if you run clang-tidy with enabled readability
> checks, you get readability-implicit-bool-conversion warning on this code.
> I actually intentionally copied this line and several of the others
> verbatim from the other targets (so that they are the same) but I can fix
> both places.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D49111
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180710/d65716a7/attachment.html>


More information about the llvm-commits mailing list