diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2022-03-24 13:10:38 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2022-03-25 14:55:13 +0000 |
commit | cf396c56e7df756d460a456f99ceab1b5d2c2e37 (patch) | |
tree | 9d52d1e76b3bd2fb5671f03a410bc2dff2e1f856 /clang/lib/Sema/SemaModule.cpp | |
parent | 7e459126185f4d5115e6e2166a866aba1369d024 (diff) | |
download | llvm-cf396c56e7df756d460a456f99ceab1b5d2c2e37.zip llvm-cf396c56e7df756d460a456f99ceab1b5d2c2e37.tar.gz llvm-cf396c56e7df756d460a456f99ceab1b5d2c2e37.tar.bz2 |
[C++20][Modules] Correct an assert for modules-ts.
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.
Differential Revision: https://reviews.llvm.org/D122394
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r-- | clang/lib/Sema/SemaModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index a115834..e28de8c 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -206,7 +206,7 @@ Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, 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"); |