1 // Test without serialization:
2 // RUN: %clang_cc1 -w -ast-dump %s | FileCheck %s
4 // Test with serialization:
5 // RUN: %clang_cc1 -w -emit-pch -o %t %s
6 // RUN: %clang_cc1 -w -x c -include-pch %t -ast-dump-all /dev/null \
7 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
10 // The cast construction code both for implicit and c-style casts is very
11 // different in C vs C++. This file is intended to test the C behavior.
13 // TODO: add tests covering the rest of the code in
14 // Sema::CheckAssignmentConstraints and Sema::PrepareScalarCast
16 // CHECK-LABEL: FunctionDecl {{.*}} cast_cvr_pointer
17 void cast_cvr_pointer(char volatile * __restrict
* const * p
) {
19 // CHECK: ImplicitCastExpr {{.*}} 'char ***' <NoOp>
21 // CHECK: CStyleCastExpr {{.*}} 'char ***' <NoOp>
25 // CHECK-LABEL: FunctionDecl {{.*}} cast_pointer_type
26 void cast_pointer_type(char *p
) {
28 // CHECK: ImplicitCastExpr {{.*}} 'void *' <BitCast>
30 // CHECK: CStyleCastExpr {{.*}} 'void *' <BitCast>