[all-commits] [llvm/llvm-project] b5baf5: [CIR] Implement func-ptr/void-ptr addition/subtrac...
Erich Keane via All-commits
all-commits at lists.llvm.org
Tue Mar 3 11:29:49 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b5baf5e062b24d0f240aae09fd771aacca891f2d
https://github.com/llvm/llvm-project/commit/b5baf5e062b24d0f240aae09fd771aacca891f2d
Author: Erich Keane <ekeane at nvidia.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)
Changed paths:
M clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp
A clang/test/CIR/CodeGen/gnu-ptr-math.c
Log Message:
-----------
[CIR] Implement func-ptr/void-ptr addition/subtraction/inc/dec. (#184254)
As a GNU extension, clang supports math on void* and function pointers
in C mode only. From a CIR perspective, it makes sense to leave these
types in the IR, since it might be useful to do analysis.
During lowering, we already properly lower these to a size-1 element, so
there is no changes that need to happen besides letting this get through
CIR generation. This patch does that, plus adds some tests.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list