annotate clang/test/Lexer/warn-date-time.c @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -verify -E
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -verify -E
anatofuz
parents:
diff changeset
3 // RUN: not %clang_cc1 -Werror=date-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -E 2>&1 | grep 'error: expansion' | count 3
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 #ifdef IS_HEADER
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 #ifdef IS_SYSHEADER
anatofuz
parents:
diff changeset
9 #pragma clang system_header
anatofuz
parents:
diff changeset
10 #endif
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 __TIME__ // expected-warning {{expansion of date or time macro is not reproducible}}
anatofuz
parents:
diff changeset
13 __DATE__ // expected-warning {{expansion of date or time macro is not reproducible}}
anatofuz
parents:
diff changeset
14 __TIMESTAMP__ // expected-warning {{expansion of date or time macro is not reproducible}}
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 #define __TIME__
anatofuz
parents:
diff changeset
17 __TIME__
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 #else
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 #define IS_HEADER
anatofuz
parents:
diff changeset
22 #include __FILE__
anatofuz
parents:
diff changeset
23 #endif