Skip to content

Commit aeebef9

Browse files
committed
[cxx-interop][rebranch] Handle clang elaborated types, part 2
This applies the same trick as #62190 for newly written code. Fixes two C++ interop tests in rebranch: * `Interop/Cxx/enum/c-enums-NS_OPTIONS-api-notes-renamed-options.swift` * `Interop/Cxx/enum/c-enums-NS_OPTIONS-swift-named-options.swift` rdar://102858524
1 parent c7ab760 commit aeebef9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ClangImporter/SwiftLookupTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ translateDeclToContext(clang::NamedDecl *decl) {
213213
return std::make_pair(SwiftLookupTable::ContextKind::Tag,
214214
typedefDecl->getName());
215215
if (auto enumDecl = dyn_cast<clang::EnumDecl>(tag)) {
216-
if (auto typedefType = dyn_cast<clang::TypedefType>(
217-
enumDecl->getIntegerType().getTypePtr())) {
216+
if (auto typedefType =
217+
dyn_cast<clang::TypedefType>(getUnderlyingType(enumDecl))) {
218218
if (importer::isUnavailableInSwift(typedefType->getDecl(), nullptr,
219219
true)) {
220220
return std::make_pair(SwiftLookupTable::ContextKind::Tag,

0 commit comments

Comments
 (0)