rsmith added a comment.

> ! In https://reviews.llvm.org/D32199#731252, @hfinkel wrote:
> 
>> How about renaming this to something more like `-fsanitize=type`?
> 
> I'm fine with that. Do you like TypeSanitizer or TypeAccessSantizer or 
> TypeAliasingSanitizer best?

I think calling it a type aliasing sanitizer would somewhat conflate the 
details of the mechanism with the fundamentals of the check itself. For example:

  variant<int, float> v;
  int &n = v.get<int>;
  v = 1.3f;
  int m = n;

... is a lifetime bug, not an aliasing bug, but would be caught by this check 
just the same. I'd be tempted to suggest EffectiveTypeSanitizer, since we seem 
to be more-or-less directly implementing C's effective type rules, except that 
name isn't so good for the C++ case. And in the longer term we will probably 
want to provide an option to enforce the real C++ lifetime rules whereby a 
store with certain !tbaa metadata is not sufficient to change the type of 
storage.

> One potential concern with calling it the type sanitizer is that we have an 
> abbreviation overlap with the thread sanitizer.

Perhaps we could abbreviate it as "tysan"? *shrug*


https://reviews.llvm.org/D32199



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

Reply via email to