This is an archive of the discontinued LLVM Phabricator instance.

[Flang][Runtime][tests] Escape regex special character.
ClosedPublic

Authored by Meinersbur on Jun 10 2021, 12:20 AM.

Details

Summary

The second argument of ASSERT_DEATH describes a regular expression, in which parenthesis 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.

Diff Detail

Event Timeline

Meinersbur created this revision.Jun 10 2021, 12:20 AM
Meinersbur requested review of this revision.Jun 10 2021, 12:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2021, 12:20 AM
awarzynski accepted this revision.Jun 10 2021, 6:56 AM

Thank you for the fix!

This revision is now accepted and ready to land.Jun 10 2021, 6:56 AM

This was the last patch to make the windows buildbot green: http://meinersbur.de:8011/#/builders/146/builds/593

Patch to make it an official buildbot: D103199

flang/unittests/RuntimeGTest/Format.cpp
182

Note: . is interpreted as well, but stands for any character, including ..