Debian Codegraph @

clang/test/AST/ast-dump-APValue-addrlabeldiff.c

raw
1 // Test without serialization:
2 // RUN: %clang_cc1 -std=c23 -ast-dump %s -ast-dump-filter Test -triple=i686 \
3 // RUN: | FileCheck --strict-whitespace --match-full-lines %s
4 //
5 // Test with serialization:
6 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=c23 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -x c -triple x86_64-unknown-unknown -Wno-unused-value -std=c23 \
8 // RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \
9 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
10 // RUN: | FileCheck --strict-whitespace --match-full-lines %s
11
12
13 // CHECK: | |-value: AddrLabelDiff &&l2 - &&l1
14 int Test(void) {
15 constexpr __INTPTR_TYPE__ ar = &&l2 - &&l1;
16 l1:
17 return 10;
18 l2:
19 return 11;
20 }
21
22