Use CXXRecordDecl for consistency (#7891)

`CXXRecordDecl` and `RecordDecl` are functionally interchangeable in our
context, and other than here we only use `RecordDecl` when APIs outside
our control force us to.
This commit is contained in:
Geoff Romer
2026-10-02 18:43:18 +00:00
committed by GitHub
parent 976692abf4
commit 35eb25c279
+2 -1
View File
@@ -161,7 +161,8 @@ auto ExportNameScopeToCpp(Context& context, SemIR::LocId loc_id,
// Complete the type here to avoid hitting a clang assert later when
// adding methods.
if (auto* record_decl = llvm::dyn_cast<clang::RecordDecl>(decl_context)) {
if (auto* record_decl =
llvm::dyn_cast<clang::CXXRecordDecl>(decl_context)) {
context.ast_context().getExternalSource()->CompleteType(record_decl);
}
}