[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Lexer / warn-date-time.c
blob96fb55317ebc604823653fbefab0f599694f6073
1 // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -verify -E
2 // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -verify -E
3 // RUN: not %clang_cc1 -Werror=date-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -E 2>&1 | grep 'error: expansion' | count 3
6 #ifdef IS_HEADER
8 #ifdef IS_SYSHEADER
9 #pragma clang system_header
10 #endif
12 __TIME__ // expected-warning {{expansion of date or time macro is not reproducible}}
13 __DATE__ // expected-warning {{expansion of date or time macro is not reproducible}}
14 __TIMESTAMP__ // expected-warning {{expansion of date or time macro is not reproducible}}
16 #define __TIME__
17 __TIME__
19 #else
21 #define IS_HEADER
22 #include __FILE__
23 #endif