[PATCH] D120905: [demangler] Add operator precedence

Nathan Sidwell via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 14:43:34 PDT 2022


On 3/28/22 16:31, Frederik Gossen via Phabricator wrote:
> frgossen added inline comments.
> 
> 
> ================
> Comment at: llvm/include/llvm/Demangle/ItaniumDemangle.h:1785
>   
>     template<typename Fn> void match(Fn F) const { F(LHS, InfixOperator, RHS); }
>   
> ----------------
> ldionne wrote:
>> goncharov wrote:
>>> I am not familiar with the code at all, but it seems to be an issue. We have downstream code that relies on the ability to match mode from ctor, but this "match" and other definitions have not been updated along with ctors. Do you mind reverting the patch for now?
>>>
>> Can you give a bit more context regarding what issue you're encountering? Since this was landed some time ago, I think it would be best to fix-forward if we can.
> We have a use of `match` that expects to invoke the constructor with the arguments it's being passed. That use is missing the precedence argument now, which is not being passed here but it is required for the constructor above.
> 
> I am not sure if this is a false use of `match` or if the `match` function should deal with the prec argument also.

Sorry about that. Does this fix the problem?  I can clean it up and look to 
adding a testcase that would have caught the problem.

nathan


> Repository:
>    rG LLVM Github Monorepo
> 
> CHANGES SINCE LAST ACTION
>    https://reviews.llvm.org/D120905/new/
> 
> https://reviews.llvm.org/D120905
> 


-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-WIP-match.patch
Type: text/x-patch
Size: 13930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220328/8cacd978/attachment.bin>


More information about the llvm-commits mailing list