From 4b8ac429a7030fd18922fb75b771587d1e6060dc Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Tue, 24 Jun 2025 09:42:51 +0200 Subject: [PATCH] Replace `isStruct() || isClass()` with `!isUnion()` (#5715) Follow up of https://github.com/carbon-language/carbon-lang/pull/5709/files#r2162385549 Part of https://github.com/carbon-language/carbon-lang/issues/5533. --- toolchain/check/import_cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/check/import_cpp.cpp b/toolchain/check/import_cpp.cpp index 25dac882afb6..7e331724f863 100644 --- a/toolchain/check/import_cpp.cpp +++ b/toolchain/check/import_cpp.cpp @@ -529,7 +529,7 @@ static auto MapBuiltinType(Context& context, const clang::BuiltinType& type) static auto MapRecordType(Context& context, SemIR::LocId loc_id, const clang::RecordType& type) -> TypeExpr { auto* record_decl = clang::dyn_cast(type.getDecl()); - if (record_decl && (record_decl->isStruct() || record_decl->isClass())) { + if (record_decl && !record_decl->isUnion()) { auto& clang_decls = context.sem_ir().clang_decls(); SemIR::InstId record_inst_id = SemIR::InstId::None; if (auto record_clang_decl_id = clang_decls.Lookup(