Add missing escape characters to the new Regex::escape() function
authorAlp Toker <alp@nuanti.com>
Thu, 12 Dec 2013 02:51:58 +0000 (02:51 +0000)
committerAlp Toker <alp@nuanti.com>
Thu, 12 Dec 2013 02:51:58 +0000 (02:51 +0000)
commit22e0e0c1de72187f9f20e9d7375422b51ec10fb9
treebf62d97e503d5507cfd501f1538b6a02e276a44a
parentdcdc5736ad62ad2ba62419e8d311d883cee1a329
Add missing escape characters to the new Regex::escape() function

The old AddFixedStringToRegEx() it was based on got away with this for the
longest time, but the problem became easy to spot after the cleanup in r197096.

Also add a quick unit test to cover regex escaping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197121 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Regex.cpp
unittests/Support/RegexTest.cpp