annotate clang/test/AST/ast-dump-APValue-todo.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 2e18cbf3894f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // Test without serialization:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // RUN: -ast-dump %s -ast-dump-filter Test \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // RUN: | FileCheck --strict-whitespace --match-full-lines %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // Test with serialization:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 -emit-pch -o %t %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // RUN: %clang_cc1 -x c++ -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu++17 \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 // RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // RUN: | FileCheck --strict-whitespace --match-full-lines %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 int i;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 struct S {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 int i;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 void Test() {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 constexpr int *pi = &i;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 // CHECK: | `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} pi 'int *const' constexpr cinit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 // CHECK-NEXT: | |-value: LValue <todo>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 constexpr int(S::*pmi) = &S::i;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 // CHECK: `-VarDecl {{.*}} <col:{{.*}}, col:{{.*}}> col:{{.*}} pmi 'int (S::*const)' constexpr cinit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 // CHECK-NEXT: |-value: MemberPointer <todo>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 }