Files
llvm-project/clang/test/CodeGenCXX/alloc-token-pointer.cpp
Aleksandr Nogikh b8618ff61e [AllocToken] [Clang] Fix type inference for atomic types (#183571)
When evaluating whether an allocated type contains a pointer to generate
the `alloc_token` metadata, `typeContainsPointer` incorrectly stopped
recursion upon encountering an `AtomicType`. This resulted in types like
`_Atomic(int *)` (or `std::atomic<int *>` under libc++) being
incorrectly evaluated as not containing a pointer.

Add support for `AtomicType` in `typeContainsPointer` by recursively
checking the contained type.

Add tests for structs containing `_Atomic(int *)` and `_Atomic(int)`.
2026-02-26 10:57:49 -08:00

8.4 KiB