aboutsummaryrefslogtreecommitdiff
path: root/clang/test/ASTMerge/exprs-cpp/test.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-02-20 11:35:33 +0000
committerPavel Labath <labath@google.com>2017-02-20 11:35:33 +0000
commitc4a339510359d57c9d143c350911a2c528201e0e (patch)
tree78411f943bc0b84e7be76c32f649039c6b09ac8e /clang/test/ASTMerge/exprs-cpp/test.cpp
parent55865432b428a80c818e52ce506d8dd98657b1f5 (diff)
downloadllvm-c4a339510359d57c9d143c350911a2c528201e0e.zip
llvm-c4a339510359d57c9d143c350911a2c528201e0e.tar.gz
llvm-c4a339510359d57c9d143c350911a2c528201e0e.tar.bz2
Fix a couple of corner cases in NameMatches
Summary: 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. Reviewers: clayborg, zturner Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D30094 llvm-svn: 295651
Diffstat (limited to 'clang/test/ASTMerge/exprs-cpp/test.cpp')
0 files changed, 0 insertions, 0 deletions