File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -360,21 +360,25 @@ bool KeyEventDigger::guessKeyEvent(Defect *def)
360
360
return true ;
361
361
}
362
362
363
- // use the last event as key event by default (unless black -listed)
363
+ // use the last event as key event by default (unless deny -listed)
364
364
for (int idx = evtCount - 1U ; idx >= 0 ; --idx) {
365
- def->keyEventIdx = idx;
366
365
const DefEvent &evt = evtList[idx];
367
366
if (evt.event == " #" )
368
367
// never use comment as the key event
369
368
continue ;
370
369
371
370
const std::string &evtName = evt.event ;
372
- if (!d->traceEvts .count (evtName) && !d->denyList .count (evtName))
373
- // never use trace or black-listed event as the key event
374
- break ;
371
+ if (d->traceEvts .count (evtName) || d->denyList .count (evtName))
372
+ // never use trace or deny-listed event as the key event
373
+ continue ;
374
+
375
+ // matched
376
+ def->keyEventIdx = idx;
377
+ return true ;
375
378
}
376
379
377
- return true ;
380
+ // no valid key event
381
+ return false ;
378
382
}
379
383
380
384
void KeyEventDigger::initVerbosity (Defect *def)
You can’t perform that action at this time.
0 commit comments