Skip to content

Commit 0db092c

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents c063e94 + fddc5b1 commit 0db092c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/ClangImporter/DWARFImporter.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ void ClangImporter::Implementation::lookupValueDWARF(
138138
return;
139139

140140
SmallVector<clang::Decl *, 4> decls;
141-
DWARFImporter->lookupValue(name.getBaseIdentifier().str(), llvm::None, decls);
141+
DWARFImporter->lookupValue(name.getBaseIdentifier().str(), None, decls);
142142
for (auto *clangDecl : decls) {
143-
auto *namedDecl = dyn_cast_or_null<clang::NamedDecl>(clangDecl);
143+
auto *namedDecl = dyn_cast<clang::NamedDecl>(clangDecl);
144144
if (!namedDecl)
145145
continue;
146146
auto *swiftDecl = cast_or_null<ValueDecl>(
@@ -168,9 +168,7 @@ void ClangImporter::Implementation::lookupTypeDeclDWARF(
168168
!isa<clang::ObjCCompatibleAliasDecl>(clangDecl)) {
169169
continue;
170170
}
171-
auto *namedDecl = dyn_cast_or_null<clang::NamedDecl>(clangDecl);
172-
if (!namedDecl)
173-
continue;
171+
auto *namedDecl = cast<clang::NamedDecl>(clangDecl);
174172
Decl *importedDecl = cast_or_null<ValueDecl>(
175173
importDeclReal(namedDecl->getMostRecentDecl(), CurrentVersion));
176174

0 commit comments

Comments
 (0)