[UpdateCCTestChecks] Fix --replace-value-regex across RUN lines
authorJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 21 Jun 2021 19:53:57 +0000 (15:53 -0400)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 21 Jun 2021 21:01:17 +0000 (17:01 -0400)
commit2bfe0536e5143caad80f7a9691fa775cf451317b
treeaf9d7c85310c66b517ece73cec532b0dfa3848a0
parent4cf74469a0f58c01a7fcf140a028b2a68f71df58
[UpdateCCTestChecks] Fix --replace-value-regex across RUN lines

Without this patch, llvm/utils/update_cc_test_checks.py fails to
perform `--replace-value-regex` replacements when two RUN lines
produce the same output and use the same single FileCheck prefix.  The
problem is that replacements in a RUN line's output are not performed
until after comparing against previous RUN lines' output, where
replacements have already been performed.  This patch fixes that.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104566
clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c [new file with mode: 0644]
clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected [new file with mode: 0644]
clang/test/utils/update_cc_test_checks/replace-value-regex-across-runs.test [new file with mode: 0644]
llvm/utils/UpdateTestChecks/common.py