diff options
author | Matheus Izvekov <mizvekov@gmail.com> | 2024-09-24 22:57:07 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 22:57:07 -0300 |
commit | 0a42c7c6679bcc6f7be4b3d103670197acac96a9 (patch) | |
tree | f5eb449a2ba543a3513f4d19c4be6cb346a9a415 /clang/lib | |
parent | 3da5e82e31712792411945b655929a1680fb476c (diff) | |
download | llvm-0a42c7c6679bcc6f7be4b3d103670197acac96a9.zip llvm-0a42c7c6679bcc6f7be4b3d103670197acac96a9.tar.gz llvm-0a42c7c6679bcc6f7be4b3d103670197acac96a9.tar.bz2 |
[clang] fix assert in ADL finding entity in the implicit global module (#109882)
This adds to the assert the implicit global module case as in module
purview.
Fixes #109879
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index ed5d44a..f3f6247 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -3850,8 +3850,9 @@ void Sema::ArgumentDependentLookup(DeclarationName Name, SourceLocation Loc, // exports are only valid in module purview and outside of any // PMF (although a PMF should not even be present in a module // with an import). - assert(FM && FM->isNamedModule() && !FM->isPrivateModule() && - "bad export context"); + assert(FM && + (FM->isNamedModule() || FM->isImplicitGlobalModule()) && + !FM->isPrivateModule() && "bad export context"); // .. are attached to a named module M, do not appear in the // translation unit containing the point of the lookup.. if (D->isInAnotherModuleUnit() && |