Wraps the expansion of TYPE_SWITCH of the constexpr interpreter
in do { ... } while (0) so that the macro can be used like this:
if (llvm::Optional<PrimType> T = Ctx.classify(FieldTy)) TYPE_SWITCH(*T, Ok &= ReturnValue<T>(FP.deref<T>(), Value)); else Ok &= Composite(FieldTy, FP, Value);
This bug was found while testing D116316. See also this review comment.
clang-format: please reformat the code
-#define TYPE_SWITCH_CASE(Name, B) \ - case Name: { using T = PrimConv<Name>::T; B; break; } +#define TYPE_SWITCH_CASE(Name, B) \ + case Name: { \ + using T = PrimConv<Name>::T; \ + B; \ + break; \ + }