[PATCH] D122394: [C++20][Modules] Correct an assert for modules-ts.
Iain Sandoe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 24 06:15:02 PDT 2022
iains created this revision.
Herald added a project: All.
iains added a reviewer: urnathan.
iains published this revision for review.
iains added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
somewhat on the trivial side.
When adding the support for modules partitions we added an assert that the
actual status of Global Module Fragments matches the state machine that is
driven by the module; keyword.
That does not apply to the modules-ts case, where there is an implicit GMF.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122394
Files:
clang/lib/Sema/SemaModule.cpp
Index: clang/lib/Sema/SemaModule.cpp
===================================================================
--- clang/lib/Sema/SemaModule.cpp
+++ clang/lib/Sema/SemaModule.cpp
@@ -173,7 +173,7 @@
ModuleScopes.back().Module->Kind == Module::GlobalModuleFragment)
GlobalModuleFragment = ModuleScopes.back().Module;
- assert((!getLangOpts().CPlusPlusModules ||
+ assert((!getLangOpts().CPlusPlusModules || getLangOpts().ModulesTS ||
SeenGMF == (bool)GlobalModuleFragment) &&
"mismatched global module state");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122394.417903.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220324/1f0811ea/attachment.bin>
More information about the cfe-commits
mailing list