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

================
Comment at: 
clang-tools-extra/docs/clang-tidy/checks/bugprone/unchecked-optional-access.rst:278
+
+Given that ``value()`` has well-defined program termination behavior, why treat
+it the same as ``operator*()`` which causes undefined behavior (UB)? That is,
----------------
xazax.hun wrote:
> Strictly speaking, `value` on an empty optional will not terminate the 
> program. It will raise an exception that can be handled.
> 
> (Of course, at Google, exceptions are banned so termination is right in that 
> context.)
Right! Updated to mention both possibilities. Thx


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143750

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

Reply via email to