2020-06-21 20:49:27 +08:00
|
|
|
// Test without serialization:
|
2013-01-05 04:34:32 +08:00
|
|
|
// RUN: %clang_cc1 -ast-dump %s | FileCheck %s
|
2020-06-21 20:49:27 +08:00
|
|
|
//
|
|
|
|
// Test with serialization:
|
|
|
|
// RUN: %clang_cc1 -emit-pch -o %t %s
|
|
|
|
// RUN: %clang_cc1 -x c -include-pch %t -ast-dump-all /dev/null \
|
|
|
|
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
|
|
|
|
// RUN: | FileCheck %s
|
2013-01-05 04:34:32 +08:00
|
|
|
|
|
|
|
void foo1(void*);
|
|
|
|
void foo2(void* const);
|
|
|
|
|
|
|
|
|
|
|
|
void bar() {
|
2014-04-02 13:48:29 +08:00
|
|
|
// CHECK: FunctionDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} bar 'void ()'
|
2013-01-05 04:34:32 +08:00
|
|
|
|
|
|
|
foo1(0);
|
2013-01-31 09:44:26 +08:00
|
|
|
// CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
|
2013-01-05 04:34:32 +08:00
|
|
|
|
|
|
|
foo2(0);
|
2013-01-31 09:44:26 +08:00
|
|
|
// CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
|
2013-01-05 04:34:32 +08:00
|
|
|
}
|