Add comment to clarify the creation of the root "Carbon" namespace

This commit is contained in:
David Blaikie
2026-03-23 07:19:41 +00:00
parent 127ace8b44
commit f84df3c41d
+4
View File
@@ -399,6 +399,10 @@ auto CarbonExternalASTSource::FindExternalVisibleDeclsByName(
scope_mapping.Lookup(const_cast<clang::DeclContext*>(decl_context));
if (!decl_context_inst_id) {
// If the context doesn't already have a mapping between C++ and Carbon,
// check if this is the root mapping (for the "Carbon" namespace in the
// translation unit scope) and if so, create that mapping.
if (decl_context->getDeclKind() != clang::Decl::Kind::TranslationUnit) {
return false;
}