[clang] [clang-tools-extra] [clang] AST: fix getAs canonicalization of leaf types (PR #155028)
James Y Knight via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 27 14:09:41 PDT 2025
jyknight wrote:
Heads up, this is breaking modules support in our buildsystem. I'm getting errors now like this:
```
libcxx/include/__atomic/memory_order.h:31:27: error: missing '#include <__atomic/memory_order.h>'; '__memory_order_underlying_t' must be declared before it is used
31 | enum class memory_order : __memory_order_underlying_t {
| ^
libcxx/include/__atomic/memory_order.h:27:7: note: declaration here is not visible
27 | using __memory_order_underlying_t _LIBCPP_NODEBUG = __underlying_type_t<__legacy_memory_order>;
```
Note that the "not visible" decl is declared literally 4 lines before the usage.
I don't know how to repro this upstream (and, I'd note, we aren't using the upstream modulemap file). My suspicion is that this commit has broken module decl-merging, where multiple copies of the same header are imported.
https://github.com/llvm/llvm-project/pull/155028
More information about the cfe-commits
mailing list