gribozavr added inline comments.
================
Comment at: clang/lib/Sema/SemaInit.cpp:6775
+    if (!pathOnlyInitializesGslPointer(Path))
+      Init = const_cast<Expr *>(Init->skipRValueSubobjectAdjustments());
 
----------------
I'm afraid this change could disable some other analysis, which would hide 
other lifetime issues. For example, while 'ptr' can't itself dangle, if 
'Temp().ptr' is bound to a local reference, it might be subject to complex 
lifetime extension rules, which this warning originally tried to check for.


================
Comment at: clang/lib/Sema/SemaInit.cpp:6897
+    if (!pathOnlyInitializesGslPointer(Path))
+      Init = const_cast<Expr *>(Init->skipRValueSubobjectAdjustments());
 
----------------
Same here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66486



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

Reply via email to