vsk added a comment.

In https://reviews.llvm.org/D30729#695463, @arphaman wrote:

> You should also add a test for `enum E : unsigned`.


Ubsan doesn't try to infer the range of enums with a fixed, underlying type. 
I'll add a test case to make sure we don't insert a check.



================
Comment at: test/CodeGenCXX/ubsan-bitfields.cpp:39
+  // CHECK-NOT: !nosanitize
+  return s->e3;
+}
----------------
filcab wrote:
> Add checks/check-nots to make sure the thing you don't want isn't emitted, 
> not just `!nosanitize`
> The checks help document what you're trying to get in each test case.
> Here I'd prefer to have a `CHECK-NOT: __ubsan_handle_load_invalid_value` than 
> a check-not for `!nosanitize`, since checking for the handler call is more 
> explicit.
> 
Good point, I will update the patch shortly.


https://reviews.llvm.org/D30729



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

Reply via email to