[Flang][Runtime][tests] Escape regex special character.
authorMichael Kruse <llvm-project@meinersbur.de>
Thu, 10 Jun 2021 16:23:53 +0000 (11:23 -0500)
committerMichael Kruse <llvm-project@meinersbur.de>
Thu, 10 Jun 2021 16:30:23 +0000 (11:30 -0500)
commit0112f6ac71517de7767296eda1db26cc4bdb14ee
treec5647e4b90c356e6c0549b9979b88eaee494ff8e
parentcfbf61cd5994985cec81068e17c0c98773af543b
[Flang][Runtime][tests] Escape regex special character.

The second argument of `ASSERT_DEATH` describes a regular expression, in
which parentheses have special meaning. Matches of literal parentheses
need to be escaped.

Fixes failure of InvalidFormatFailure.ParenMismatch and
InvalidFormatFailure.ParenMismatch when gtest is compiled with MSVC's
regex implementation.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D104011
flang/unittests/RuntimeGTest/Format.cpp