JonasToth marked an inline comment as done.
JonasToth added inline comments.


================
Comment at: clang-tidy/cppcoreguidelines/OwningMemoryCheck.cpp:188
+    diag(OwnerAssignment->getLocStart(),
+         "assigning neither an owner nor a recognized resource")
+        << SourceRange(OwnerAssignment->getLocStart(),
----------------
aaron.ballman wrote:
> Same comments here as above about "owner" and "recognized resource". I think 
> you want to talk about `gsl::owner<>` where you use "owner" and drop 
> "recognized resource" (because such a resource returns a 
> `gsl::owner<>`-flagged type, if I understand properly).
ideally every created resource would be flagged as `gsl::owner<>`, but for 
example `fopen`, `malloc` and friends can't, but would benefit the most from 
such a check (+ flow analysis if the owner gets consumed on every path)


https://reviews.llvm.org/D36354



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

Reply via email to