[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:13:58 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;
----------------
Could the size of the vector ever be wrong? Should this be an assert instead?
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