Skip to content

Commit 00ac424

Browse files
committed
Simplify comparison against CustomCppVoidType::TypeId.
1 parent 82c272c commit 00ac424

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

toolchain/check/cpp/type_mapping.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ static auto MapNonWrapperType(Context& context, SemIR::InstId inst_id,
186186
static auto TryMapVoidPointer(Context& context, SemIR::TypeId type_id,
187187
llvm::SmallVector<SemIR::TypeId>& wrapper_types)
188188
-> clang::QualType {
189-
if (context.types().Is<SemIR::CustomCppVoidType>(type_id) &&
190-
!wrapper_types.empty() &&
189+
if (type_id == SemIR::CustomCppVoidType::TypeId && !wrapper_types.empty() &&
191190
context.types().Is<SemIR::PointerType>(wrapper_types.back())) {
192191
wrapper_types.pop_back();
193192
return context.ast_context().getAttributedType(

0 commit comments

Comments
 (0)