Skip to content

Commit ba608be

Browse files
committed
add additional tests
1 parent 5a48b97 commit ba608be

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

clang/test/Preprocessor/embed___has_embed_parsing_errors.c

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,34 @@
251251
#if __has_embed("") // expected-error {{empty filename}}
252252
#endif
253253

254-
// expected-error@+4 {{missing ')' after '__has_embed'}} \
255-
expected-error@+4 {{expected value in expression}} \
256-
expected-error@+4 {{unterminated conditional directive}} \
257-
expected-note@+4 {{to match this '('}}
254+
// expected-error@+9 {{unterminated conditional directive}}
255+
// expected-error@+13 {{unterminated conditional directive}}
256+
// expected-error@+17 {{unterminated conditional directive}}
257+
// expected-error@+21 {{unterminated conditional directive}}
258+
// expected-error@+25 {{unterminated conditional directive}}
259+
260+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
261+
expected-error@+3 {{expected value in expression}} \
262+
expected-note@+3 {{to match this '('}}
263+
#if __has_embed (__FILE__ foo limit(1)
264+
265+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
266+
expected-error@+3 {{expected value in expression}} \
267+
expected-note@+3 {{to match this '('}}
268+
#if __has_embed (__FILE__ foo
269+
270+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
271+
expected-error@+3 {{expected value in expression}} \
272+
expected-note@+3 {{to match this '('}}
273+
#if __has_embed ("a" foo()
274+
275+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
276+
expected-error@+3 {{expected value in expression}} \
277+
expected-note@+3 {{to match this '('}}
278+
#if __has_embed ("a" bar() foo
279+
280+
// expected-error@+3 {{missing ')' after '__has_embed'}} \
281+
expected-error@+3 {{expected value in expression}} \
282+
expected-note@+3 {{to match this '('}}
258283
#if __has_embed (__FILE__ limit(1) foo
259284
int a = __has_embed (__FILE__);

0 commit comments

Comments
 (0)