File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -764,7 +764,8 @@ def warn_pp_date_time : Warning<
764
764
765
765
def warn_pp_encounter_nonreproducible: Warning<
766
766
"encountered non-reproducible token, caching will be skipped">,
767
- InGroup<DiagGroup<"reproducible-caching">>, DefaultIgnore;
767
+ InGroup<DiagGroup<"reproducible-caching">>,
768
+ DefaultWarnNoWerror, ShowInSystemHeader, ShowInSystemMacro;
768
769
def err_pp_encounter_nonreproducible: Error<
769
770
"encountered non-reproducible token, caching failed">;
770
771
Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t && mkdir -p %t
2
+ // RUN: split-file %s %t
3
+
4
+ // No warning in normal invocation.
5
+ // RUN: %clang -target x86_64-apple-macos11 -fsyntax-only %t/t.c -isystem %t/sys 2>&1 | FileCheck %s --check-prefix=NOWARN --allow-empty
6
+ // NOWARN-NOT: warning
7
+
8
+ // Warning in cached invocation even if coming from system header. -Werror does not affect it.
9
+ // RUN: %clang -target x86_64-apple-macos11 -c %t/t.c -o %t/t.o -isystem %t/sys -Werror \
10
+ // RUN: -fdepscan=inline -Xclang -fcas-path -Xclang %t/cas -Xclang -fcache-compile-job 2>&1 | FileCheck %s --check-prefix=WARN
11
+ // WARN: warning: encountered non-reproducible token
12
+
13
+ // Error if explicitly turned into error.
14
+ // RUN: not %clang -target x86_64-apple-macos11 -c %t/t.c -o %t/t.o -isystem %t/sys -Werror=reproducible-caching \
15
+ // RUN: -fdepscan=inline -Xclang -fcas-path -Xclang %t/cas -Xclang -fcache-compile-job 2>&1 | FileCheck %s --check-prefix=ERROR
16
+ // ERROR: error: encountered non-reproducible token
17
+
18
+ //--- t.c
19
+ #include <sys.h>
20
+
21
+ //--- sys/sys.h
22
+ const char * foo () {
23
+ return __DATE__ ;
24
+ }
You can’t perform that action at this time.
0 commit comments