| Issue |
63900
|
| Summary |
_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS causes bad diagnostics
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
smeenai
|
I'm upgrading Meta's Android codebase to C++20, and I'm building with `-D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` globally to ease the initial transition. That somehow causes incomplete backtraces in some diagnostics. See https://godbolt.org/z/TMKWrzd59 as an example, where the error message has no reference to the actual problematic `emplace_back` call, whereas either building with `-std=c++17` (https://godbolt.org/z/1oq4q4Pb8) or removing `-D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` (https://godbolt.org/z/6v3f7aKor) gives the expected full error.
Can we improve this? I expect it's not uncommon to use `-D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` and other definitions during the C++20 upgrade process, and there are certain errors that are exposed only when building with C++20 (e.g. https://godbolt.org/z/cEMvdrca8), so this issue makes it much harder to figure out the cause of those errors.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs