[flang-commits] [PATCH] D140340: [flang] Restore checking for some optional values before use
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Dec 19 12:47:01 PST 2022
klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
Recent commits (2098ad7f00324ee0f2a6538f418a6f81dfdd2edb <https://reviews.llvm.org/rG2098ad7f00324ee0f2a6538f418a6f81dfdd2edb> and
15a9a72ee68166c0cff3f036cacd3c82be66c729 <https://reviews.llvm.org/rG15a9a72ee68166c0cff3f036cacd3c82be66c729>) replaced usage of "o.value()"
on optionals with "*o". Those optional values are expected to be
present, but now, if they're not, compilation will proceed with
garbage data rather than crashing on an uncaught exception.
Add asserts for presence to restore the previous level of safety.
https://reviews.llvm.org/D140340
Files:
flang/include/flang/Evaluate/tools.h
flang/lib/Lower/Bridge.cpp
flang/lib/Lower/ConvertCall.cpp
flang/lib/Lower/ConvertExpr.cpp
flang/lib/Lower/ConvertExprToHLFIR.cpp
flang/lib/Lower/CustomIntrinsicCall.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140340.484042.patch
Type: text/x-patch
Size: 5712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221219/78ee69e1/attachment.bin>
More information about the flang-commits
mailing list