[libcxx-commits] [PATCH] D120905: [demangler] Add operator precedence

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 29 11:48:17 PDT 2022


dblaikie added a comment.

In D120905#3413721 <https://reviews.llvm.org/D120905#3413721>, @urnathan wrote:

> In D120905#3412594 <https://reviews.llvm.org/D120905#3412594>, @dblaikie wrote:
>
>> In D120905#3412586 <https://reviews.llvm.org/D120905#3412586>, @dblaikie wrote:
>>
>>> In D120905#3412571 <https://reviews.llvm.org/D120905#3412571>, @urnathan wrote:
>>>
>>>> - F22582853: 0001-WIP-match.patch <https://reviews.llvm.org/F22582853>
>>>
>>> Ah, thanks for posting - I committed an incomplete fix (didn't touch all the other ctors) in 1d1cf9b6c42c820f38eb776cb7504564441a23ee <https://reviews.llvm.org/rG1d1cf9b6c42c820f38eb776cb7504564441a23ee> - I think the right thing is probably to do-nothing in `print(Node::Prec prec)` - since I assume/my understanding is that the printing already accounts for precedence by adding parentheses etc where needed?
>>
>> In any case, @urnathan - could you go ahead and commit the rest of the match fixes (& maybe for now leave my no-op version of `print(Prec)` in place - happy to discuss further what that should/shouldn't do here before we make further changes)? Or I can if you like.
>
> I have pushed:
>
>   c204cee642ee 2022-03-29 | [demangler] Update node match calls
>
> to address the missing ctor args in the match functions.  The Visitor print call you mention, and a variant in cxa_demangle.cpp's NDEBUG code (it is sad there's more duplication), should print the name of the enumerator -- these are visitors for dumping a textual representation of the node graph.
>
> I'll post a patch to do that, along with a testcase exercising this piece of machinery, for review.

awesome, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120905/new/

https://reviews.llvm.org/D120905



More information about the libcxx-commits mailing list