Skip to content

Commit

Permalink
LLVM Pass - Only access first element if vector is non-empty
Browse files Browse the repository at this point in the history
For Issue #216
  • Loading branch information
bprail committed Aug 22, 2019
1 parent de8b5fc commit 2de91e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions llvm-contech/BufferCheckAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace llvm
// accumulate the state from multiple branches
int BufferCheckAnalysis::accumulateBranch(vector<int>& srcs)
{
if (srcs.empty() == true) return 0;
int ret = srcs[0];
for (int i = 1; i < srcs.size(); ++i)
{
Expand Down

0 comments on commit 2de91e8

Please sign in to comment.