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
4
5
6#ifdef IS_HEADER
7
8#ifdef IS_SYSHEADER
9#pragma clang system_header
10#endif
11
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}}
15
16#define __TIME__
17__TIME__
18
19#else
20
21#define IS_HEADER
22#include __FILE__
23#endif
24