[PATCH] D92297: [CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 12:33:18 PST 2020


rsmith accepted this revision.
rsmith added a comment.

Looks good. There are a few other places where we unconditionally insert `dereferenceable` attributes (for reference parameters / return types, and for C99's `T [static]` array parameters). We should presumably apply the same workaround everywhere we add `dereferenceable`.



================
Comment at: clang/lib/CodeGen/CGCall.cpp:2178
+      // NullPointerIsValid.  However, dereferenceable currently does not always
+      // respect NullPointerIsValid and may imply nonnul and break the program.
+      // See https://reviews.llvm.org/D66664 for discussions.
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92297/new/

https://reviews.llvm.org/D92297



More information about the cfe-commits mailing list