There was some duplicate code in determineStarAmpUsage and
determinePlusMinusCaretUsage
Now a - or + following ;, sizeof, co_await, or delete is
regarded as a unary operator.
Now a * or & following case is also a unary operator.
Differential D121754
[clang-format] Refactor determineStarAmpUsage NFC sstwcw on Mar 15 2022, 4:26 PM. Authored by
Details There was some duplicate code in determineStarAmpUsage and Now a - or + following ;, sizeof, co_await, or delete is Now a * or & following case is also a unary operator.
Diff Detail
Event Timeline
Comment Actions About the tokens that were only in one function. question, colon, and TT_ConditionalExpr, are for same thing. question was added before they added TT_ConditionalExpr. It looks like now only TT_ConditionalExpr would be enough. kw_return and kw_throw were in both functions. kw_case, kw_co_await, and kw_delete are now only in one function like before this revisioin. semi and kw_sizeof have test cases.
Comment Actions
This is what I love about you all, you push me to learn more about C++, its a slippery b****r
Comment Actions Just a side note, I often get this on your changes:
Comment Actions I cannot view the diff between the last two revisions:
Comment Actions Maybe it's because I removed the final empty line when I pasted the diff as I thought that LF was a line terminator instead of a line separator. I will try using arc from now on. |
I'm not sure about this. Why not handle them here too?