mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 19:16:05 +00:00

If the std::initializer_list is exported out of module, its `DeclContext` is not a namespace as `Sema::isStdInitializerList` expects, but an `Decl::Kind::Export` and only its parent is a namespace. So this commit makes `Sema::isStdInitializerList` account for that. I'm really new to clang so I'm not 100% sure that was the issue, it seems so and it fixes compilation. Also I probably need to add tests but I'd like someone to approve the idea first. Fixes https://github.com/llvm/llvm-project/issues/118218
See llvm/docs/README.txt