[PATCH] D149259: [analyzer][NFC] Use std::optional instead of custom "empty" state
DonĂ¡t Nagy via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 4 04:04:14 PDT 2023
donat.nagy added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:313-315
+ } else if (const auto *SRegion = dyn_cast<SubRegion>(Region)) {
+ // NOTE: The dyn_cast<>() is expected to succeed, it'd be very surprising
+ // to see a MemSpaceRegion at this point.
----------------
steakhal wrote:
> FYI, you can unconditionally cast it. The assertion wouldn't fire - at least it didn't for us.
I only noticed this after merging my change, but this won't be relevant, because the followup commits will completely restructure this part of the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149259/new/
https://reviews.llvm.org/D149259
More information about the cfe-commits
mailing list