[PATCH] D63954: Add lifetime categories attributes
    Dmitri Gribenko via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jul 29 07:37:28 PDT 2019
    
    
  
gribozavr added inline comments.
================
Comment at: cfe/trunk/include/clang/Basic/AttrDocs.td:4252
+
+The argument ``T`` is optional and currently ignored.
+This attribute may be used by analysis tools and has no effect on code
----------------
"and is currently ignored"
even better:
"and is ignored"
It does not matter for the user that we might change it in future. We might change *anything* in future, and yet we don't hedge everywhere.
================
Comment at: cfe/trunk/include/clang/Basic/AttrDocs.td:4278
+
+The argument ``T`` is optional and currently ignored.
+This attribute may be used by analysis tools and has no effect on code
----------------
ditto
================
Comment at: cfe/trunk/test/SemaCXX/attr-gsl-owner-pointer.cpp:34
+class [[gsl::Owner(void)]] OwnerVoidDerefType{};
+// expected-error at -1 {{'void' is an invalid argument to attribute 'Owner'}}
+class [[gsl::Pointer(void)]] PointerVoidDerefType{};
----------------
Technically correct, but not very helpful for the user.
It would be better if the message was tailored for the attribute, for example,
owner types can't own an object of type 'void'
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63954/new/
https://reviews.llvm.org/D63954
    
    
More information about the llvm-commits
mailing list