1*67e74705SXin Li // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -verify -E 2*67e74705SXin Li // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -verify -E 3*67e74705SXin Li // RUN: not %clang_cc1 -Werror=date-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -E 2>&1 | grep 'error: expansion' | count 3 4*67e74705SXin Li 5*67e74705SXin Li 6*67e74705SXin Li #ifdef IS_HEADER 7*67e74705SXin Li 8*67e74705SXin Li #ifdef IS_SYSHEADER 9*67e74705SXin Li #pragma clang system_header 10*67e74705SXin Li #endif 11*67e74705SXin Li 12*67e74705SXin Li __TIME__ // expected-warning {{expansion of date or time macro is not reproducible}} 13*67e74705SXin Li __DATE__ // expected-warning {{expansion of date or time macro is not reproducible}} 14*67e74705SXin Li __TIMESTAMP__ // expected-warning {{expansion of date or time macro is not reproducible}} 15*67e74705SXin Li 16*67e74705SXin Li #define __TIME__ 17*67e74705SXin Li __TIME__ 18*67e74705SXin Li 19*67e74705SXin Li #else 20*67e74705SXin Li 21*67e74705SXin Li #define IS_HEADER 22*67e74705SXin Li #include __FILE__ 23*67e74705SXin Li #endif 24