[PATCH] D21695: [clang] Version support for UBSan handlers

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 11:30:24 PST 2016


vsk accepted this revision.
vsk added a reviewer: vsk.
vsk added a comment.
This revision is now accepted and ready to land.

Thanks for working on this. LGTM with a nit.



================
Comment at: lib/CodeGen/CGExpr.cpp:2506
+  assert(CheckHandler >= 0 &&
+         CheckHandler < sizeof(SanitizerHandlers) / sizeof(*SanitizerHandlers));
+  const StringRef CheckName = SanitizerHandlers[CheckHandler].Name;
----------------
Use llvm::array_lengthof? Also, I don't think the >= 0 check is really necessary, but I'll leave it up to you to decide.


https://reviews.llvm.org/D21695





More information about the cfe-commits mailing list