[PATCH] [Patch] UBsan: Type-based blacklisting

Alexey Samsonov vonosmas at gmail.com
Thu Jul 10 10:35:07 PDT 2014

LGTM modulo nit below. Let me know if I should commit this for you. Test in Clang is fine, but I would also add an "end-to-end" test case in compiler-rt ubsan lit test-suite. This can of course be done separately. Thanks!

Comment at: test/CodeGen/ubsan-type-blacklist.cpp:20
@@ +19,3 @@
+// DEFAULT: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (%class.Bar* @bar to
+// TYPE-NOT: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (%class.Bar* @bar to
+  Foo* foo = static_cast<Foo*>(&bar); // down-casting
I'd use less restrictive pattern for TYPE-NOT, smth. like
  TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss


More information about the cfe-commits mailing list