[PATCH] D149259: [analyzer][NFC] Use std::optional instead of custom "empty" state
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 4 02:39:24 PDT 2023
steakhal added a comment.
In D149259#4317788 <https://reviews.llvm.org/D149259#4317788>, @steakhal wrote:
> We only had a single new issue after this patch. This is well within what I would be comfortable with. I'll investigate the case anyway. It's likely something flaky.
It did not reproduce, so it was a fluke.
================
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.
----------------
FYI, you can unconditionally cast it. The assertion wouldn't fire - at least it didn't for us.
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