[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 13:37:18 PDT 2019


gribozavr added inline comments.


================
Comment at: clang/test/Sema/warn-lifetime-analysis-nocfg.cpp:25
+
+struct [[gsl::Owner(int)]] OwnerWithConv {
+  OwnerWithConv();
----------------
xazax.hun wrote:
> gribozavr wrote:
> > Would be nice if the second pair of types had clearly related names, like the first pair (MyOwner/MyPointer).
> Would renaming `MyPtrFromConv` to `PointerFromConv ` be enough to suggest the relationship?
Yes, that would be sufficient. However my best suggestion would be:

MyOwner => MyIntOwner
MyPointer => MyIntPointer

OwnerWithConv => MyLongOwnerWithConversion
MyPtrFromConv => MyLongPointerFromConversion

Also makes it clear which two types are related together.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64256/new/

https://reviews.llvm.org/D64256





More information about the cfe-commits mailing list