forked from OSchip/llvm-project
[llvm] A macro of if should be wrapped in do ... while (false)
This commit is contained in:
parent
6699f55488
commit
9510d5971e
|
@ -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},
|
||||
|
|
Loading…
Reference in New Issue