[PATCH] D39485: Extend SpecialCaseList to allow users to blame matches on entries in the file.

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 17:35:04 PDT 2017


hctim created this revision.

Extends SCL functionality to allow users to find the line number in the file the SCL is built from through SpecialCaseList::inSectionBlame(...).

Also removes the need to compile the SCL before use. As the matcher now contains a list of regexes to test against instead of a single regex, the regexes can be individually built on each insertion rather than one large compilation at the end of construction.

This change also fixes a bug where blank lines would cause the parser to become out-of-sync with the line number. An error on line `k` was being reported as being on line `k - num_blank_lines_before_k`.


https://reviews.llvm.org/D39485

Files:
  include/llvm/Support/SpecialCaseList.h
  lib/Support/SpecialCaseList.cpp
  unittests/Support/SpecialCaseListTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39485.121093.patch
Type: text/x-patch
Size: 10017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171101/419bc7bd/attachment.bin>


More information about the llvm-commits mailing list