xazax.hun marked 6 inline comments as done.
xazax.hun added inline comments.


================
Comment at: clang/lib/Sema/SemaInit.cpp:7076
+        auto Prefix = llvm::makeArrayRef(Path).drop_back();
+      if (pathInitializeLifetimePointer(Prefix))
+        IsLifetimePtrInitWithTempOwner = true;
----------------
gribozavr wrote:
> Is it important that the whole path only contains gsl::Pointer nodes?
We are trying to figure out what do we initialize a `gsl::Pointer` annotated 
class. The reason why we have multiple `GslPointerInit`s in the path is that we 
usually can see a lot of intermediate temporary objects. Looking at the AST of 
the examples I have so far the other kind of paths does not seem to be 
relevant. I can imagine refining this condition later after examining a false 
negative but I think starting with the most conservative approach should be 
reasonable for warnings. 


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

https://reviews.llvm.org/D64256



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

Reply via email to