This is an archive of the discontinued LLVM Phabricator instance.

[LLVM/Support] - Make match() method of llvm::Regex to be const
AbandonedPublic

Authored by grimar on Aug 30 2016, 6:52 AM.

Details

Summary

This can help to D23829.
I have a std::vector of Regex and use ArrayRefs to pass it.
The fact of match() is not const forces me to use const_cast for
removing it. Also there is no way to call match() on
Regex const reference, at the same time the only thing match()
can change is error field and method name and job it do does not sounds
like something not-const.

Diff Detail

Event Timeline

grimar updated this revision to Diff 69673.Aug 30 2016, 6:52 AM
grimar retitled this revision from to [LLVM/Support] - Make match() method of llvm::Regex to be const.
grimar updated this object.
grimar added reviewers: rafael, davide, dblaikie, ruiu.
grimar added subscribers: llvm-commits, grimar.
grimar abandoned this revision.Aug 31 2016, 8:15 AM