Skip to content

Commit fdec50a

Browse files
authored
Merge pull request #28419 from CodaFi/import-of-call
Drop the requirement that nested types be clang::TypeDecls
2 parents 79444c4 + 4043d43 commit fdec50a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,12 +2906,11 @@ ClangModuleUnit::lookupNestedType(Identifier name,
29062906
// If the entry is not visible, skip it.
29072907
if (!isVisibleClangEntry(clangCtx, entry)) continue;
29082908

2909-
auto clangDecl = entry.dyn_cast<clang::NamedDecl *>();
2910-
auto clangTypeDecl = dyn_cast_or_null<clang::TypeDecl>(clangDecl);
2911-
if (!clangTypeDecl)
2909+
auto *clangDecl = entry.dyn_cast<clang::NamedDecl *>();
2910+
if (!clangDecl)
29122911
continue;
29132912

2914-
clangTypeDecl = cast<clang::TypeDecl>(clangTypeDecl->getMostRecentDecl());
2913+
const auto *clangTypeDecl = clangDecl->getMostRecentDecl();
29152914

29162915
bool anyMatching = false;
29172916
TypeDecl *originalDecl = nullptr;

0 commit comments

Comments
 (0)