[Lldb-commits] [PATCH] D30094: Fix a couple of corner cases in NameMatches
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 17 07:24:46 PST 2017
labath created this revision.
Herald added a subscriber: mgorny.
I originally set out to move the NameMatches closer to the relevant
function and add some unit tests. However, in the process I've found a
couple of bugs in the implementation:
- the early exits where not always correct:
- (test==pattern) does not mean the match will always suceed because of regular expressions
- pattern.empty() does not mean the match will fail because the "" is a valid prefix of any string
So I cleaned up those and added some tests. The only tricky part here
was that regcomp() implementation on darwin did not recognise the empty
string as a regular expression and returned an REG_EMPTY error instead.
The simples fix here seemed to be to replace the empty expression with
an equivalent non-empty one.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 17176 bytes
Desc: not available
More information about the lldb-commits