@@ -95,18 +95,10 @@ int textual(int *p) {
9595// `safe_buffers_test_optout`, which uses another top-level module
9696// `safe_buffers_test_base`. (So the module dependencies form a DAG.)
9797
98- // No expected warnings from base.h because base.h is a separate
99- // module and in a separate TU that is not textually included. The
100- // explicit command that builds base.h has no `-Wunsafe-buffer-usage`.
101-
102- // [email protected] :3{{unsafe buffer access}}103- // [email protected] :3{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}104- // expected-warning@test_sub1.h:5{{unsafe buffer access}}
105- // expected-note@test_sub1.h:5{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
106- // expected-warning@test_sub1.h:14{{unsafe buffer access}}
107- // expected-note@test_sub1.h:14{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
108- // expected-warning@test_sub2.h:5{{unsafe buffer access}}
109- // expected-note@test_sub2.h:5{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
98+ // No expected warnings from base.h, test_sub1, or test_sub2 because they are
99+ // in seperate modules, and the explicit commands that builds them have no
100+ // `-Wunsafe-buffer-usage`.
101+
110102int foo (int * p) {
111103 int x = p[5 ]; // expected-warning{{unsafe buffer access}} expected-note{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
112104#pragma clang unsafe_buffer_usage begin
@@ -129,14 +121,10 @@ int foo(int * p) {
129121// `safe_buffers_test_optout`, which uses another top-level module
130122// `safe_buffers_test_base`. (So the module dependencies form a DAG.)
131123
132- // [email protected] :3{{unsafe buffer access}}133- // [email protected] :3{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}134- // expected-warning@test_sub1.h:5{{unsafe buffer access}}
135- // expected-note@test_sub1.h:5{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
136- // expected-warning@test_sub1.h:14{{unsafe buffer access}}
137- // expected-note@test_sub1.h:14{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
138- // expected-warning@test_sub2.h:5{{unsafe buffer access}}
139- // expected-note@test_sub2.h:5{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
124+ // No expected warnings from base.h, test_sub1, or test_sub2 because they are
125+ // in seperate modules, and the explicit commands that builds them have no
126+ // `-Wunsafe-buffer-usage`.
127+
140128int foo (int * p) {
141129 int x = p[5 ]; // expected-warning{{unsafe buffer access}} expected-note{{pass -fsafe-buffer-usage-suggestions to receive code hardening suggestions}}
142130#pragma clang unsafe_buffer_usage begin
0 commit comments