Skip to content

Commit

Permalink
line_length_rule: Added deductions for reverse_iterator
Browse files Browse the repository at this point in the history
Clang had issued deducing the arguments for reverse_iterator, so typing
info had to be added

Signed-off-by: Jan Bylicki <[email protected]>
  • Loading branch information
jbylicki committed May 5, 2023
1 parent 4b8e64a commit e40aef7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions verilog/analysis/checkers/line_length_rule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ static verible::TokenRange SeekLastNonNewlineToken(
// text_begin is the frontal limiter that shall not be overrun.
// If such a token isn't found, the input range is returned
auto found_it = std::find_if(
std::reverse_iterator(token_range.begin()),
std::reverse_iterator(text_begin),
std::reverse_iterator<TokenSequence::const_iterator>(token_range.begin()),
std::reverse_iterator<TokenSequence::const_iterator>(text_begin),
[](const TokenInfo& t) { return t.token_enum() != TK_NEWLINE; });

if (found_it != std::reverse_iterator(text_begin)) {
if (found_it != std::reverse_iterator<TokenSequence::const_iterator>(text_begin)) {
// Use the last non-newline token as a new beginning.
auto new_begin = found_it.base() - 1;
// We move the front backwards, so now it's possible that there are
Expand Down

0 comments on commit e40aef7

Please sign in to comment.