2020-06-21 13:49:27 +01:00
|
|
|
// Test without serialization:
|
2013-01-04 20:34:32 +00:00
|
|
|
// RUN: %clang_cc1 -ast-dump %s | FileCheck %s
|
2020-06-21 13:49:27 +01: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-04 20:34:32 +00:00
|
|
|
|
|
|
|
void foo1(void*);
|
|
|
|
void foo2(void* const);
|
|
|
|
|
|
|
|
|
2022-02-09 09:10:10 -05:00
|
|
|
void bar(void) {
|
|
|
|
// CHECK: FunctionDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} bar 'void (void)'
|
2013-01-04 20:34:32 +00:00
|
|
|
|
|
|
|
foo1(0);
|
2013-01-31 01:44:26 +00:00
|
|
|
// CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
|
2013-01-04 20:34:32 +00:00
|
|
|
|
|
|
|
foo2(0);
|
2013-01-31 01:44:26 +00:00
|
|
|
// CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
|
2013-01-04 20:34:32 +00:00
|
|
|
}
|