[PATCH] D39212: Check special-case-list regex before insertion.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 16:25:48 PDT 2017


vsk added inline comments.


================
Comment at: lib/Support/SpecialCaseList.cpp:40
   }
   Trigrams.insert(Regexp);
 
----------------
CC'ing @vlad.tsyrklevich 

You might prevent more bugs by having TrigramIndex::insert check for empty strings and return an Error. Moving the check there should also make it easier to add a unit test (see TrigramIndexTest.cpp).



https://reviews.llvm.org/D39212





More information about the llvm-commits mailing list