Skip to content

Commit cfc2b9a

Browse files
committed
update tests
1 parent ab1d0c7 commit cfc2b9a

File tree

1 file changed

+21
-33
lines changed

1 file changed

+21
-33
lines changed

clang/test/Preprocessor/embed___has_embed_parsing_errors.c

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
// RUN: split-file %s %t
2-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test1.c
3-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test2.c
4-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test3.c
5-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test4.c
6-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test5.c
7-
// RUN: %clang_cc1 -std=c23 -E -verify %t/test6.c
8-
9-
//--- test1.c
1+
// RUN: %clang_cc1 -std=c23 %s -E -verify
102

113
// Test the parsing behavior for __has_embed and all of its parameters to ensure we
124
// recover from failures gracefully.
@@ -259,38 +251,34 @@
259251
#if __has_embed("") // expected-error {{empty filename}}
260252
#endif
261253

262-
//--- test2.c
263-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
264-
expected-error@+4 {{expected value in expression}} \
265-
expected-note@+4 {{to match this '('}} \
266-
expected-error@+4 {{unterminated conditional directive}}
254+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
255+
expected-error@+3 {{expected value in expression}} \
256+
expected-note@+3 {{to match this '('}}
267257
#if __has_embed (__FILE__ foo limit(1)
258+
#endif
268259

269260
//--- test3.c
270-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
271-
expected-error@+4 {{expected value in expression}} \
272-
expected-note@+4 {{to match this '('}} \
273-
expected-error@+4 {{unterminated conditional directive}}
261+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
262+
expected-error@+3 {{expected value in expression}} \
263+
expected-note@+3 {{to match this '('}}
274264
#if __has_embed (__FILE__ foo
265+
#endif
275266

276-
//--- test4.c
277-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
278-
expected-error@+4 {{expected value in expression}} \
279-
expected-note@+4 {{to match this '('}} \
280-
expected-error@+4 {{unterminated conditional directive}}
267+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
268+
expected-error@+3 {{expected value in expression}} \
269+
expected-note@+3 {{to match this '('}}
281270
#if __has_embed ("a" foo()
271+
#endif
282272

283-
//--- test5.c
284-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
285-
expected-error@+4 {{expected value in expression}} \
286-
expected-note@+4 {{to match this '('}} \
287-
expected-error@+4 {{unterminated conditional directive}}
273+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
274+
expected-error@+3 {{expected value in expression}} \
275+
expected-note@+3 {{to match this '('}}
288276
#if __has_embed ("a" bar() foo
277+
#endif
289278

290-
//--- test6.c
291-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
292-
expected-error@+4 {{expected value in expression}} \
293-
expected-note@+4 {{to match this '('}} \
294-
expected-error@+4 {{unterminated conditional directive}}
279+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
280+
expected-error@+3 {{expected value in expression}} \
281+
expected-note@+3 {{to match this '('}}
295282
#if __has_embed (__FILE__ limit(1) foo
296283
int a = __has_embed (__FILE__);
284+
#endif

0 commit comments

Comments
 (0)