aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorBruno De Fraine <brunodf@synopsys.com>2025-02-20 13:06:56 +0100
committerGitHub <noreply@github.com>2025-02-20 16:06:56 +0400
commit458b1e9d2c61945f62b5bdfda93914d6a46b6cc7 (patch)
treefafcf9ffd6c5ff28121d75c5e4c206515351e80f /clang/lib/Frontend/InitPreprocessor.cpp
parent9855d761f36f08a7d23e52c62cf1932e386669fc (diff)
downloadllvm-458b1e9d2c61945f62b5bdfda93914d6a46b6cc7.zip
llvm-458b1e9d2c61945f62b5bdfda93914d6a46b6cc7.tar.gz
llvm-458b1e9d2c61945f62b5bdfda93914d6a46b6cc7.tar.bz2
[TBAA] Refine pointer-tbaa for void pointers by pointer depth (#126047)
Commit 77d3f8a avoids distinct tags for any pointers where the ultimate pointee type is `void`, to solve breakage in real-world code that uses (indirections to) `void*` for polymorphism over different pointer types. While this matches the TBAA implementation in GCC, this patch implements a refinement that distinguishes void pointers by pointer depth, as described in the "strict aliasing" documentation included in the aforementioned commit: > `void*` is permitted to alias any pointer type, `void**` is permitted > to alias any pointer to pointer type, and so on. For example, `void**` is no longer considered to alias `int*` in this refinement, but it remains possible to use `void**` for polymorphism over pointers to pointers.
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions