[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 5 10:14:46 PDT 2022
xazax.hun added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:84
+ if (!BlockToOutputState ||
+ BlockToOutputState->size() <= Context->getCFG().getExit().getBlockID())
+ return;
----------------
xazax.hun wrote:
> Could the size of the vector ever be wrong? Should this be an assert instead?
Whoops, after the update this comment is out of place, now it supposed to be on line 60.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121120/new/
https://reviews.llvm.org/D121120
More information about the cfe-commits
mailing list