xazax.hun added inline comments.

================
Comment at: clang/lib/Sema/SemaInit.cpp:7095
       auto *MTE = dyn_cast<MaterializeTemporaryExpr>(L);
+      if (IsGslPtrInitWithGslTempOwner) {
+        Diag(DiagLoc, diag::warn_dangling_lifetime_pointer) << DiagRange;
----------------
gribozavr wrote:
> It is unclear to me why `if (IsGslPtrInitWithGslTempOwner)` is before `if 
> (!MTE)`, seems like that exclusion should apply to our case, too.
The reason was that I always skipped MTEs and was looking for the expr that 
actually initialized MTEs. Relying on MTEs, however, turned out to simplify the 
code a bit. Updating the diff, thanks!


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