Resolve possible test failure on Windows
authorChris Bieneman <chris.bieneman@me.com>
Fri, 9 Dec 2022 19:27:49 +0000 (13:27 -0600)
committerChris B <cbieneman@microsoft.com>
Fri, 9 Dec 2022 19:43:52 +0000 (13:43 -0600)
If dr0xx.c's timestamp is newer than dr324.c the preprocessor will issue
an unexpected diagnostic in dr324.c. To prevent this diagnostic we can
have dr324.c run touch against itself to force its timestamp to be new.

clang/test/C/drs/dr324.c

index 9d5264017b3db388ad61a26c5e83114eb5b87a19..2d75853e5af7c1a95192e5debfd953fd426ead50 100644 (file)
@@ -1,4 +1,5 @@
-/* RUN: %clang_cc1 -std=c89 -fsyntax-only -fms-extensions -pedantic -verify %s
+/* RUN: touch %s
+   RUN: %clang_cc1 -std=c89 -fsyntax-only -fms-extensions -pedantic -verify %s
    RUN: %clang_cc1 -std=c99 -fsyntax-only -fms-extensions -pedantic -verify %s
    RUN: %clang_cc1 -std=c11 -fsyntax-only -fms-extensions -pedantic -verify %s
    RUN: %clang_cc1 -std=c17 -fsyntax-only -fms-extensions -pedantic -verify %s