[PATCH] D117301: [clang][NFC] Wrap TYPE_SWITCH in "do while (0)" in the interpreter

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 19 01:48:25 PST 2022


owenpan added a comment.

In D117301#3253874 <https://reviews.llvm.org/D117301#3253874>, @RKSimon wrote:

> what about COMPOSITE_TYPE_SWITCH and INT_TYPE_SWITCH - should they be updated as well?

I left them alone because `COMPOSITE_TYPE_SWITCH` didn't cause a dangling `else` problem and `INT_TYPE_SWITCH` was not used at all. I can fix them both or fix the former and remvoe the latter from the header file. Also, the current `do { ... } while (0)` statements in `TYPE_SWITCH_CASE` and `COMPOSITE_TYPE_SWITCH` are superfluous. I can remove them as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117301



More information about the cfe-commits mailing list