annotate clang/test/AST/implicit-cast-dump.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 // Test without serialization:
150
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
3 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
4 // Test with serialization:
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
5 // RUN: %clang_cc1 -emit-pch -o %t %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
6 // RUN: %clang_cc1 -x c -include-pch %t -ast-dump-all /dev/null \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
8 // RUN: | FileCheck %s
150
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 void foo1(void*);
anatofuz
parents:
diff changeset
11 void foo2(void* const);
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 void bar() {
anatofuz
parents:
diff changeset
15 // CHECK: FunctionDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} bar 'void ()'
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 foo1(0);
anatofuz
parents:
diff changeset
18 // CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 foo2(0);
anatofuz
parents:
diff changeset
21 // CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
anatofuz
parents:
diff changeset
22 }