[SelectOpt] Support ADD and SUB with zext operands. (#115489)
[llvm-project.git] / clang / test / CXX / expr / expr.cast / p4.cpp
blob907e008724420bbe5a40f3ca51f59b5bfe522f64
1 // RUN: %clang_cc1 -ast-dump %s | FileCheck %s
3 struct A { int x; };
4 struct B { int y; };
5 struct C : A, B { };
7 // CHECK: casting_away_constness
8 void casting_away_constness(const B &b, const C &c, const B *bp, const C *cp) {
9 // CHECK: DerivedToBase (B)
10 // CHECK: DeclRefExpr {{.*}} ParmVar {{.*}} 'c'
11 (void)(B&)c;
12 // CHECK: BaseToDerived (B)
13 // CHECK: DeclRefExpr {{.*}} ParmVar {{.*}} 'b'
14 (void)(C&)b;
15 // CHECK: DerivedToBase (B)
16 // CHECK: DeclRefExpr {{.*}} ParmVar {{.*}} 'cp'
17 (void)(B*)cp;
18 // CHECK: BaseToDerived (B)
19 // CHECK: DeclRefExpr {{.*}} ParmVar {{.*}} 'bp'
20 (void)(C*)bp;
21 // CHECK: ReturnStmt
22 return;