arphaman added a comment.

That makes sense. It's kinda weird not to report the `null`, but I guess it 
makes sense if the `null` sanitiser is off. It's not actually UB unless it's 
dereferenced, right, so casts are allowed?


================
Comment at: test/CodeGenCXX/ubsan-type-checks.cpp:73
+// VPTR_NO_NULL-LABEL: define void @_Z13invalid_cast3P3Cat
+void invalid_cast3(Cat *cat = nullptr) {
+  // Fall back to the vptr sanitizer's null check when -fsanitize=null isn't
----------------
Can you use reuse the first `invalid_cast` with different checks since the code 
is the same?


https://reviews.llvm.org/D36112



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to