@@ -446,11 +446,10 @@ static auto ClangLookup(Context& context, SemIR::NameScopeId scope_id,
446446 auto scope_clang_decl_context_id =
447447 context.name_scopes ().Get (scope_id).clang_decl_context_id ();
448448 bool found = sema.LookupQualifiedName (
449- lookup,
450- clang::dyn_cast<clang::DeclContext>(context.sem_ir ()
451- .clang_decls ()
452- .Get (scope_clang_decl_context_id)
453- .decl ));
449+ lookup, dyn_cast<clang::DeclContext>(context.sem_ir ()
450+ .clang_decls ()
451+ .Get (scope_clang_decl_context_id)
452+ .decl ));
454453
455454 if (!found) {
456455 return std::nullopt ;
@@ -720,7 +719,7 @@ static auto ImportClassObjectRepr(Context& context, SemIR::ClassId class_id,
720719
721720 // Import fields.
722721 for (auto * decl : clang_def->decls ()) {
723- auto * field = clang:: dyn_cast<clang::FieldDecl>(decl);
722+ auto * field = dyn_cast<clang::FieldDecl>(decl);
724723
725724 // Track the chain of fields from the class to this field. This chain is
726725 // only one element long unless the field is a member of an anonymous struct
@@ -731,7 +730,7 @@ static auto ImportClassObjectRepr(Context& context, SemIR::ClassId class_id,
731730 // If this isn't a field, it might be an indirect field in an anonymous
732731 // struct or union.
733732 if (!field) {
734- auto * indirect_field = clang:: dyn_cast<clang::IndirectFieldDecl>(decl);
733+ auto * indirect_field = dyn_cast<clang::IndirectFieldDecl>(decl);
735734 if (!indirect_field) {
736735 continue ;
737736 }
@@ -773,12 +772,12 @@ static auto ImportClassObjectRepr(Context& context, SemIR::ClassId class_id,
773772
774773 // Compute the offset to the field that appears directly in the class.
775774 uint64_t offset = clang_layout.getFieldOffset (
776- clang:: cast<clang::FieldDecl>(chain.front ())->getFieldIndex ());
775+ cast<clang::FieldDecl>(chain.front ())->getFieldIndex ());
777776
778777 // If this is an indirect field, walk the path and accumulate the offset to
779778 // the named field.
780779 for (auto * inner_decl : chain.drop_front ()) {
781- auto * inner_field = clang:: cast<clang::FieldDecl>(inner_decl);
780+ auto * inner_field = cast<clang::FieldDecl>(inner_decl);
782781 const auto & inner_layout =
783782 context.ast_context ().getASTRecordLayout (inner_field->getParent ());
784783 offset += inner_layout.getFieldOffset (inner_field->getFieldIndex ());
@@ -930,7 +929,7 @@ static auto MapBuiltinType(Context& context, clang::QualType qual_type,
930929// Maps a C++ record type to a Carbon type.
931930static auto MapRecordType (Context& context, const clang::RecordType& type)
932931 -> TypeExpr {
933- auto * record_decl = clang:: dyn_cast<clang::CXXRecordDecl>(type.getDecl ());
932+ auto * record_decl = dyn_cast<clang::CXXRecordDecl>(type.getDecl ());
934933 if (!record_decl) {
935934 return {.inst_id = SemIR::TypeInstId::None, .type_id = SemIR::TypeId::None};
936935 }
@@ -1407,7 +1406,7 @@ static auto AddDependentUnimportedDecls(const Context& context,
14071406
14081407 if (auto * clang_function_decl = clang_decl->getAsFunction ()) {
14091408 AddDependentUnimportedFunctionDecls (context, *clang_function_decl, decls);
1410- } else if (auto * type_decl = clang:: dyn_cast<clang::TypeDecl>(clang_decl)) {
1409+ } else if (auto * type_decl = dyn_cast<clang::TypeDecl>(clang_decl)) {
14111410 AddDependentUnimportedTypeDecls (
14121411 context, type_decl->getASTContext ().getTypeDeclType (type_decl), decls);
14131412 }
@@ -1422,11 +1421,10 @@ static auto ImportDeclAfterDependencies(Context& context, SemIR::LocId loc_id,
14221421 if (auto * clang_function_decl = clang_decl->getAsFunction ()) {
14231422 return ImportFunctionDecl (context, loc_id, clang_function_decl);
14241423 }
1425- if (auto * clang_namespace_decl =
1426- clang::dyn_cast<clang::NamespaceDecl>(clang_decl)) {
1424+ if (auto * clang_namespace_decl = dyn_cast<clang::NamespaceDecl>(clang_decl)) {
14271425 return ImportNamespaceDecl (context, clang_namespace_decl);
14281426 }
1429- if (auto * type_decl = clang:: dyn_cast<clang::TypeDecl>(clang_decl)) {
1427+ if (auto * type_decl = dyn_cast<clang::TypeDecl>(clang_decl)) {
14301428 auto type = type_decl->getASTContext ().getTypeDeclType (type_decl);
14311429 auto type_inst_id = MapType (context, loc_id, type).inst_id ;
14321430 if (!type_inst_id.has_value ()) {
@@ -1436,7 +1434,7 @@ static auto ImportDeclAfterDependencies(Context& context, SemIR::LocId loc_id,
14361434 }
14371435 return type_inst_id;
14381436 }
1439- if (clang:: isa<clang::FieldDecl, clang::IndirectFieldDecl>(clang_decl)) {
1437+ if (isa<clang::FieldDecl, clang::IndirectFieldDecl>(clang_decl)) {
14401438 // Usable fields get imported as a side effect of importing the class.
14411439 if (SemIR::InstId existing_inst_id =
14421440 LookupClangDeclInstId (context, clang_decl);
0 commit comments