[PATCH] D131337: Wrap `llvm_unreachable` macro in do-while loop
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 6 13:33:42 PDT 2022
sgraenitz added a comment.
Please find more details on the diagnosis here https://github.com/llvm/llvm-project/issues/56867#issuecomment-1205190498
================
Comment at: llvm/include/llvm/Support/ErrorHandling.h:152
+ do { LLVM_BUILTIN_TRAP; LLVM_BUILTIN_UNREACHABLE; \
+ } while (false)
#endif
----------------
One might argue that macros should always expand into the same expression type. Not sure it's necessary here, but of course we could apply this change to the other cases as well. Let me know if you think it would be better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131337/new/
https://reviews.llvm.org/D131337
More information about the llvm-commits
mailing list