[llvm] A macro of if should be wrapped in do ... while (false)

This commit is contained in:
owenca 2022-07-15 00:25:01 -07:00
parent 6699f55488
commit 9510d5971e
1 changed files with 4 additions and 2 deletions

View File

@ -36,8 +36,10 @@ using namespace llvm::codeview;
namespace {
#define error(X) \
if (auto EC = X) \
return EC;
do { \
if (auto EC = X) \
return EC; \
} while (false)
static const EnumEntry<TypeLeafKind> LeafTypeNames[] = {
#define CV_TYPE(enum, val) {#enum, enum},