Home | History | Annotate | Download | only in Support

Lines Matching refs:foo

24   struct foo *baz();
25 struct foo *caz();
26 struct foo *daz();
27 struct foo *naz();
31 struct foo {
39 template <> struct isa_impl<foo, bar> {
46 foo *bar::baz() {
47 return cast<foo>(this);
50 foo *bar::caz() {
51 return cast_or_null<foo>(this);
54 foo *bar::daz() {
55 return dyn_cast<foo>(this);
58 foo *bar::naz() {
59 return dyn_cast_or_null<foo>(this);
70 const foo *null_foo = NULL;
79 EXPECT_TRUE(isa<foo>(B1));
80 EXPECT_TRUE(isa<foo>(B2));
81 EXPECT_TRUE(isa<foo>(B3));
82 EXPECT_TRUE(isa<foo>(B4));
86 foo &F1 = cast<foo>(B1);
88 const foo *F3 = cast<foo>(B2);
90 const foo *F4 = cast<foo>(B2);
92 const foo &F5 = cast<foo>(B3);
94 const foo *F6 = cast<foo>(B4);
96 foo *F7 = cast<foo>(fub());
98 foo *F8 = B1.baz();
103 const foo *F11 = cast_or_null<foo>(B2);
105 const foo *F12 = cast_or_null<foo>(B2);
107 const foo *F13 = cast_or_null<foo>(B4);
109 const foo *F14 = cast_or_null<foo>(fub()); // Shouldn't print.
111 foo *F15 = B1.caz();
116 const foo *F1 = dyn_cast<foo>(B2);
118 const foo *F2 = dyn_cast<foo>(B2);
120 const foo *F3 = dyn_cast<foo>(B4);
122 // foo *F4 = dyn_cast<foo>(fub()); // not permittible
124 foo *F5 = B1.daz();
129 const foo *F1 = dyn_cast_or_null<foo>(B2);
131 const foo *F2 = dyn_cast_or_null<foo>(B2);
133 const foo *F3 = dyn_cast_or_null<foo>(B4);
135 foo *F4 = dyn_cast_or_null<foo>(fub());
137 foo *F5 = B1.naz();
142 //foo *F20 = cast<foo>(B2); // Yields const foo*
143 //foo &F21 = cast<foo>(B3); // Yields const foo&
144 //foo *F22 = cast<foo>(B4); // Yields const foo*
145 //foo &F23 = cast_or_null<foo>(B1);
146 //const foo &F24 = cast_or_null<foo>(B3);