[clang] [CIR][ABI] Add restrict, nonnull, and ReturnsNonNull attributes (PR #188281)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 15:46:44 PDT 2026
================
@@ -31,7 +31,7 @@ A *a() {
// LLVM: define {{.*}} ptr @_Z1av() {{.*}} personality ptr @__gxx_personality_v0 {
// LLVM: %[[RETVAL:.*]] = alloca ptr
// LLVM: %[[NEW_RESULT:.*]] = alloca ptr
-// LLVM: %[[PTR:.*]] = call ptr @_Znwm(i64 8) #[[ATTR_BUILTIN_NEW:.*]]
+// LLVM: %[[PTR:.*]] = call nonnull ptr @_Znwm(i64 8) #[[ATTR_BUILTIN_NEW:.*]]
----------------
andykaylor wrote:
I like that you're checking this here, but if we're going to do that, we should also check the attributes on the OGCG call.
https://github.com/llvm/llvm-project/pull/188281
More information about the cfe-commits
mailing list