Author: Jordan Rupprecht
Date: 2026-06-17T23:03:46-05:00
New Revision: fecb127c3a6553b2a7b060954c5b1a15c644beed

URL: 
https://github.com/llvm/llvm-project/commit/fecb127c3a6553b2a7b060954c5b1a15c644beed
DIFF: 
https://github.com/llvm/llvm-project/commit/fecb127c3a6553b2a7b060954c5b1a15c644beed.diff

LOG: [clang-cl][test] Use /Zs to avoid writing unnecessary output files 
(#204501)

#194779 adds a test clang/test/Preprocessor/init-datetime-macros.c which
verifies some diagnostics. However, it does so with `/c`, which will
unnecessarily generate an output, and when run on a build system that
does not run tests in a writeable dir by default, will cause the test to
fail.

Since we don't care about the resulting object file, use `/Zs`
(equivalent of `-fsyntax-only`) to check the diagnostics but not produce
any output files.

Added: 
    

Modified: 
    clang/test/Preprocessor/init-datetime-macros.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Preprocessor/init-datetime-macros.c 
b/clang/test/Preprocessor/init-datetime-macros.c
index 239bafd2b241e..685cbdd617314 100644
--- a/clang/test/Preprocessor/init-datetime-macros.c
+++ b/clang/test/Preprocessor/init-datetime-macros.c
@@ -27,7 +27,7 @@
 //  /d1nodatetime - undefines __DATE__, __TIME__ and __TIMESTAMP__
 //  /Brepro - sets __DATE__, __TIME__ and __TIMESTAMP__ to "1"
 
-// RUN: %clang_cl -Xclang -verify /d1nodatetime /DDATETIME_UNDEFINED /c -- %s
+// RUN: %clang_cl -Xclang -verify /d1nodatetime /DDATETIME_UNDEFINED /Zs -- %s
 
 // RUN: %clang_cl -E /Brepro /DDATETIME_LITERALONE -- %s | FileCheck %s 
--check-prefix CHECK-INIT-DATETIME-LITERALONE
 


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to