Skip to content

Commit 9e3e6e8

Browse files
committed
Use an early exit
1 parent ed6b713 commit 9e3e6e8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7343,10 +7343,11 @@ void AttributeChecker::visitStaticExclusiveOnlyAttr(
73437343
}
73447344

73457345
void AttributeChecker::visitWeakLinkedAttr(WeakLinkedAttr *attr) {
7346-
if (Ctx.LangOpts.Target.isOSBinFormatCOFF()) {
7347-
diagnoseAndRemoveAttr(attr, diag::attr_unsupported_on_target,
7348-
attr->getAttrName(), Ctx.LangOpts.Target.str());
7349-
}
7346+
if (!Ctx.LangOpts.Target.isOSBinFormatCOFF())
7347+
return;
7348+
7349+
diagnoseAndRemoveAttr(attr, diag::attr_unsupported_on_target,
7350+
attr->getAttrName(), Ctx.LangOpts.Target.str());
73507351
}
73517352

73527353
namespace {

0 commit comments

Comments
 (0)