[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 22 03:33:46 PDT 2017


arphaman added a comment.

It looks like if we have a function without the `return` (like the sample below), we will pass in a `0` as the location pointer. This will prevent a report of a runtime error as your compiler-rt change ignores the location pointers that are `nil`. Is this a bug or is this the intended behaviour?

  int *_Nonnull nonnull_retval1(int *p) {
  }


https://reviews.llvm.org/D34299





More information about the cfe-commits mailing list