[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Lexer / digraph.c
blob5d8a77d53950c88af24261a30c8ee0804c0963f9
1 // RUN: %clang_cc1 -DDIGRAPHS=1 -fsyntax-only -verify -ffreestanding %s
2 // RUN: %clang_cc1 -DDIGRAPHS=1 -fno-digraphs -fdigraphs -fsyntax-only -verify -ffreestanding %s
3 // RUN: %clang_cc1 -fno-digraphs -fsyntax-only -verify -ffreestanding %s
4 // RUN: %clang_cc1 -fdigraphs -fno-digraphs -fsyntax-only -verify -ffreestanding %s
5 // RUN: %clang_cc1 -std=c89 -DDIGRAPHS=1 -fdigraphs -fsyntax-only -verify -ffreestanding %s
6 // RUN: %clang_cc1 -std=c89 -fno-digraphs -fsyntax-only -verify -ffreestanding %s
8 #if DIGRAPHS
10 // expected-no-diagnostics
11 %:include <stdint.h>
13 %:ifndef BUFSIZE
14 %:define BUFSIZE 512
15 %:endif
17 void copy(char d<::>, const char s<::>, int len)
19 while (len-- >= 0)
21 d<:len:> = s<:len:>;
24 #else
26 // expected-error@+1 {{expected identifier or '('}}
27 %:include <stdint.h>
29 // expected-error@+1 {{expected ')'}} expected-note@+1{{to match this '('}}
30 void copy(char d<::>);
32 // expected-error@+1 {{expected function body}}
33 void copy() <% %>
35 #endif