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)
360360 return true ;
361361 }
362362
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)
364364 for (int idx = evtCount - 1U ; idx >= 0 ; --idx) {
365- def->keyEventIdx = idx;
366365 const DefEvent &evt = evtList[idx];
367366 if (evt.event == " #" )
368367 // never use comment as the key event
369368 continue ;
370369
371370 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 ;
375378 }
376379
377- return true ;
380+ // no valid key event
381+ return false ;
378382}
379383
380384void KeyEventDigger::initVerbosity (Defect *def)
You can’t perform that action at this time.
0 commit comments