Skip to content

Commit 0a01d7f

Browse files
authored
Merge pull request swiftlang#75099 from swiftlang/egorzhdan/redundant-if
[cxx-interop] Minor refactoring: remove a redundant check
2 parents 48a888a + 76578ee commit 0a01d7f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5709,11 +5709,10 @@ void cloneImportedAttributes(ValueDecl *fromDecl, ValueDecl* toDecl) {
57095709
break;
57105710
}
57115711
case DeclAttrKind::Custom: {
5712-
if (CustomAttr *cAttr = cast<CustomAttr>(attr)) {
5713-
attrs.add(CustomAttr::create(context, SourceLoc(), cAttr->getTypeExpr(),
5714-
cAttr->getInitContext(), cAttr->getArgs(),
5715-
true));
5716-
}
5712+
CustomAttr *cAttr = cast<CustomAttr>(attr);
5713+
attrs.add(CustomAttr::create(context, SourceLoc(), cAttr->getTypeExpr(),
5714+
cAttr->getInitContext(), cAttr->getArgs(),
5715+
true));
57175716
break;
57185717
}
57195718
case DeclAttrKind::DiscardableResult: {

0 commit comments

Comments
 (0)