[PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 1 18:24:57 PST 2020
rsmith added a comment.
Thanks! We should also have a test for the behavior when targeting the MS ABI, where we sometimes don't emit the `nonnull dereferenceable` because the "`this`" pointer might actually point outside the object, but otherwise I think this is ready to go.
Please can you also put together a patch for the release notes? This seems worth mentioning there.
================
Comment at: clang/test/CodeGenCXX/this-nonnull.cpp:1-2
+// RUN: %clang -S -emit-llvm -o - -fdelete-null-pointer-checks %s | FileCheck %s -check-prefix=CHECK-YES
+// RUN: %clang -S -emit-llvm -o - -fno-delete-null-pointer-checks %s | FileCheck %s -check-prefix=CHECK-NO
+
----------------
This test needs a `-triple` or it will fail on (at least) non-Itanium hosts.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D17993/new/
https://reviews.llvm.org/D17993
More information about the cfe-commits
mailing list