Lines Matching refs:ModuleScopes

76   if (!ModuleScopes.empty() &&  in ActOnGlobalModuleFragmentDecl()
77 ModuleScopes.back().Module->Kind == Module::GlobalModuleFragment) { in ActOnGlobalModuleFragmentDecl()
82 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnGlobalModuleFragmentDecl()
133 ModuleScopes.push_back({}); // No GMF in HandleStartOfHeaderUnit()
134 ModuleScopes.back().BeginLoc = StartOfTU; in HandleStartOfHeaderUnit()
135 ModuleScopes.back().Module = Mod; in HandleStartOfHeaderUnit()
136 ModuleScopes.back().ModuleInterface = true; in HandleStartOfHeaderUnit()
137 ModuleScopes.back().IsPartition = false; in HandleStartOfHeaderUnit()
204 assert(ModuleScopes.size() <= 1 && "expected to be at global module scope"); in ActOnModuleDecl()
210 if (!ModuleScopes.empty() && in ActOnModuleDecl()
211 ModuleScopes.back().Module->isModulePurview()) { in ActOnModuleDecl()
213 Diag(VisibleModules.getImportLoc(ModuleScopes.back().Module), in ActOnModuleDecl()
220 if (!ModuleScopes.empty() && in ActOnModuleDecl()
221 ModuleScopes.back().Module->Kind == Module::GlobalModuleFragment) in ActOnModuleDecl()
222 GlobalModuleFragment = ModuleScopes.back().Module; in ActOnModuleDecl()
233 ModuleScopes.empty() in ActOnModuleDecl()
235 : ModuleScopes.back().BeginLoc; in ActOnModuleDecl()
319 ModuleScopes.push_back({}); in ActOnModuleDecl()
321 ModuleScopes.back().OuterVisibleModules = std::move(VisibleModules); in ActOnModuleDecl()
328 ModuleScopes.back().BeginLoc = StartLoc; in ActOnModuleDecl()
329 ModuleScopes.back().Module = Mod; in ActOnModuleDecl()
330 ModuleScopes.back().ModuleInterface = MDK != ModuleDeclKind::Implementation; in ActOnModuleDecl()
331 ModuleScopes.back().IsPartition = IsPartition; in ActOnModuleDecl()
367 switch (ModuleScopes.empty() ? Module::GlobalModuleFragment in ActOnPrivateModuleFragmentDecl()
368 : ModuleScopes.back().Module->Kind) { in ActOnPrivateModuleFragmentDecl()
379 Diag(ModuleScopes.back().BeginLoc, diag::note_previous_definition); in ActOnPrivateModuleFragmentDecl()
386 if (!ModuleScopes.back().ModuleInterface) { in ActOnPrivateModuleFragmentDecl()
388 Diag(ModuleScopes.back().BeginLoc, in ActOnPrivateModuleFragmentDecl()
390 << FixItHint::CreateInsertion(ModuleScopes.back().BeginLoc, "export "); in ActOnPrivateModuleFragmentDecl()
405 ModuleScopes.back().Module, PrivateLoc); in ActOnPrivateModuleFragmentDecl()
409 ModuleScopes.push_back({}); in ActOnPrivateModuleFragmentDecl()
410 ModuleScopes.back().BeginLoc = ModuleLoc; in ActOnPrivateModuleFragmentDecl()
411 ModuleScopes.back().Module = PrivateModuleFragment; in ActOnPrivateModuleFragmentDecl()
412 ModuleScopes.back().ModuleInterface = true; in ActOnPrivateModuleFragmentDecl()
441 assert(!ModuleScopes.empty() && "in a module purview, but no module?"); in ActOnModuleImport()
442 Module *NamedMod = ModuleScopes.back().Module; in ActOnModuleImport()
466 << ModuleName << !ModuleScopes.back().ModuleInterface; in ActOnModuleImport()
536 if (!ModuleScopes.empty()) in ActOnModuleImport()
537 Context.addModuleInitializer(ModuleScopes.back().Module, Import); in ActOnModuleImport()
544 } else if (!ModuleScopes.empty() && in ActOnModuleImport()
545 (ModuleScopes.back().ModuleInterface || in ActOnModuleImport()
547 ModuleScopes.back().Module->isGlobalModule()))) { in ActOnModuleImport()
548 assert((!ModuleScopes.back().Module->isGlobalModule() || in ActOnModuleImport()
563 << (!ModuleScopes.empty() && in ActOnModuleImport()
564 !ModuleScopes.back().ImplicitGlobalModuleFragment); in ActOnModuleImport()
604 if (!ModuleScopes.empty()) in BuildModuleInclude()
605 Context.addModuleInitializer(ModuleScopes.back().Module, ImportD); in BuildModuleInclude()
624 ModuleScopes.push_back({}); in ActOnModuleBegin()
625 ModuleScopes.back().Module = Mod; in ActOnModuleBegin()
627 ModuleScopes.back().OuterVisibleModules = std::move(VisibleModules); in ActOnModuleBegin()
647 VisibleModules = std::move(ModuleScopes.back().OuterVisibleModules); in ActOnModuleEnd()
653 assert(!ModuleScopes.empty() && ModuleScopes.back().Module == Mod && in ActOnModuleEnd()
655 ModuleScopes.pop_back(); in ActOnModuleEnd()
720 if (ModuleScopes.empty() || !ModuleScopes.back().Module->isModulePurview()) { in ActOnStartExportDecl()
724 } else if (!ModuleScopes.back().ModuleInterface) { in ActOnStartExportDecl()
726 Diag(ModuleScopes.back().BeginLoc, in ActOnStartExportDecl()
728 << FixItHint::CreateInsertion(ModuleScopes.back().BeginLoc, "export "); in ActOnStartExportDecl()
731 } else if (ModuleScopes.back().Module->Kind == in ActOnStartExportDecl()
734 Diag(ModuleScopes.back().BeginLoc, diag::note_private_module_fragment); in ActOnStartExportDecl()
933 ModuleScopes.push_back({BeginLoc, GlobalModuleFragment, in PushGlobalModuleFragment()
944 assert(!ModuleScopes.empty() && getCurrentModule()->isGlobalModule() && in PopGlobalModuleFragment()
946 ModuleScopes.pop_back(); in PopGlobalModuleFragment()