[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 09:48:02 PDT 2019


xbolva00 added a comment.

&a[0] is really UB in C? Oh =[

Can we have clang warning also for this case? And suggest “a”?

Very common code, I think. Hopefully llvm’s optimizers do not exploit this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67122





More information about the cfe-commits mailing list