[PATCH] D120723: [pseudo] Fix an out-of-bound error in LRTable::find.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 3 05:30:24 PST 2022
hokein added a comment.
Fixed in 28ccf326725d0fea8648834c8acdbdfe3aa40d7a <https://reviews.llvm.org/rG28ccf326725d0fea8648834c8acdbdfe3aa40d7a>.
================
Comment at: clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp:115
TargetedStates, [&Src](LRTable::StateID S) { return S < Src; });
- if (It == TargetedStates.end())
+ if (Start == TargetedStates.end())
return {};
----------------
sammccall wrote:
> I think this check is no longer needed
sorry, should have thought more carefully on this comment, we need this check to make sure we don't access `Actions[Actions.end()]` on Line120 below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120723/new/
https://reviews.llvm.org/D120723
More information about the cfe-commits
mailing list