Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 2 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 3 | // CHECK: private constant [15 x i8] c"externFunction\00" |
| 4 | // CHECK: private constant [26 x i8] c"void NS::externFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 5 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 6 | // CHECK: private constant [22 x i8] c"classTemplateFunction\00" |
| 7 | // CHECK: private constant [60 x i8] c"void NS::ClassTemplate<NS::Base *>::classTemplateFunction()\00" |
| 8 | // CHECK: private constant [53 x i8] c"void NS::ClassTemplate<int>::classTemplateFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 9 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 10 | // CHECK: private constant [18 x i8] c"functionTemplate1\00" |
| 11 | // CHECK: private constant [45 x i8] c"void NS::Base::functionTemplate1(NS::Base *)\00" |
| 12 | // CHECK: private constant [38 x i8] c"void NS::Base::functionTemplate1(int)\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 13 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 14 | // CHECK: private constant [23 x i8] c"anonymousUnionFunction\00" |
| 15 | // CHECK: private constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous union>::anonymousUnionFunction()\00" |
| 16 | |
| 17 | // CHECK: private constant [24 x i8] c"anonymousStructFunction\00" |
| 18 | // CHECK: private constant [85 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous struct>::anonymousStructFunction()\00" |
| 19 | |
| 20 | // CHECK: private constant [23 x i8] c"anonymousClassFunction\00" |
| 21 | // CHECK: private constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous class>::anonymousClassFunction()\00" |
| 22 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 23 | // CHECK: private constant [12 x i8] c"~Destructor\00" |
Sam Weinig | 3a1ce1e | 2009-12-06 23:55:13 +0000 | [diff] [blame] | 24 | // CHECK: private constant [30 x i8] c"NS::Destructor::~Destructor()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 25 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 26 | // CHECK: private constant [12 x i8] c"Constructor\00" |
Sam Weinig | 3a1ce1e | 2009-12-06 23:55:13 +0000 | [diff] [blame] | 27 | // CHECK: private constant [41 x i8] c"NS::Constructor::Constructor(NS::Base *)\00" |
| 28 | // CHECK: private constant [34 x i8] c"NS::Constructor::Constructor(int)\00" |
| 29 | // CHECK: private constant [31 x i8] c"NS::Constructor::Constructor()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 30 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 31 | // CHECK: private constant [16 x i8] c"virtualFunction\00" |
| 32 | // CHECK: private constant [44 x i8] c"virtual void NS::Derived::virtualFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 33 | |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 34 | // CHECK: private constant [22 x i8] c"constVolatileFunction\00" |
| 35 | // CHECK: private constant [54 x i8] c"void NS::Base::constVolatileFunction() const volatile\00" |
| 36 | |
| 37 | // CHECK: private constant [17 x i8] c"volatileFunction\00" |
| 38 | // CHECK: private constant [43 x i8] c"void NS::Base::volatileFunction() volatile\00" |
| 39 | |
| 40 | // CHECK: private constant [14 x i8] c"constFunction\00" |
| 41 | // CHECK: private constant [37 x i8] c"void NS::Base::constFunction() const\00" |
| 42 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 43 | // CHECK: private constant [26 x i8] c"functionReturingTemplate2\00" |
| 44 | // CHECK: private constant [64 x i8] c"ClassTemplate<NS::Base *> NS::Base::functionReturingTemplate2()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 45 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 46 | // CHECK: private constant [26 x i8] c"functionReturingTemplate1\00" |
| 47 | // CHECK: private constant [57 x i8] c"ClassTemplate<int> NS::Base::functionReturingTemplate1()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 48 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 49 | // CHECK: private constant [23 x i8] c"withTemplateParameter2\00" |
| 50 | // CHECK: private constant [65 x i8] c"void NS::Base::withTemplateParameter2(ClassTemplate<NS::Base *>)\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 51 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 52 | // CHECK: private constant [23 x i8] c"withTemplateParameter1\00" |
| 53 | // CHECK: private constant [58 x i8] c"void NS::Base::withTemplateParameter1(ClassTemplate<int>)\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 54 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 55 | // CHECK: private constant [23 x i8] c"functionReturningClass\00" |
| 56 | // CHECK: private constant [45 x i8] c"NS::Base *NS::Base::functionReturningClass()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 57 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 58 | // CHECK: private constant [23 x i8] c"functionWithParameters\00" |
| 59 | // CHECK: private constant [64 x i8] c"void NS::Base::functionWithParameters(int, float *, NS::Base *)\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 60 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 61 | // CHECK: private constant [17 x i8] c"variadicFunction\00" |
| 62 | // CHECK: private constant [42 x i8] c"void NS::Base::variadicFunction(int, ...)\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 63 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 64 | // CHECK: private constant [41 x i8] c"virtual void NS::Base::virtualFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 65 | |
Daniel Dunbar | 0a23d76 | 2009-09-12 23:06:21 +0000 | [diff] [blame] | 66 | // CHECK: private constant [15 x i8] c"inlineFunction\00" |
| 67 | // CHECK: private constant [32 x i8] c"void NS::Base::inlineFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 68 | |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 69 | // CHECK: private constant [15 x i8] c"staticFunction\00" |
| 70 | // CHECK: private constant [39 x i8] c"static void NS::Base::staticFunction()\00" |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 71 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 72 | // CHECK: private constant [26 x i8] c"topLevelNamespaceFunction\00" |
| 73 | // CHECK: private constant [59 x i8] c"void ClassInTopLevelNamespace::topLevelNamespaceFunction()\00" |
| 74 | |
| 75 | // CHECK: private constant [27 x i8] c"anonymousNamespaceFunction\00" |
| 76 | // CHECK: private constant [84 x i8] c"void <anonymous namespace>::ClassInAnonymousNamespace::anonymousNamespaceFunction()\00" |
| 77 | |
Sam Weinig | 3521d01 | 2009-12-28 03:19:38 +0000 | [diff] [blame^] | 78 | // CHECK: private constant [19 x i8] c"localClassFunction\00" |
| 79 | // CHECK: private constant [59 x i8] c"void NS::localClass(int)::LocalClass::localClassFunction()\00" |
| 80 | |
Mike Stump | 76bee4b | 2009-10-08 23:05:06 +0000 | [diff] [blame] | 81 | int printf(const char * _Format, ...); |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 82 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 83 | class ClassInTopLevelNamespace { |
| 84 | public: |
| 85 | void topLevelNamespaceFunction() { |
| 86 | printf("__func__ %s\n", __func__); |
| 87 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 88 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 89 | } |
| 90 | }; |
| 91 | |
| 92 | namespace { |
| 93 | |
| 94 | class ClassInAnonymousNamespace { |
| 95 | public: |
| 96 | void anonymousNamespaceFunction() { |
| 97 | printf("__func__ %s\n", __func__); |
| 98 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 99 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 100 | } |
| 101 | }; |
| 102 | |
| 103 | } // end anonymous namespace |
| 104 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 105 | namespace NS { |
| 106 | |
| 107 | template<typename T> |
| 108 | class ClassTemplate { |
| 109 | public: |
| 110 | void classTemplateFunction() { |
| 111 | printf("__func__ %s\n", __func__); |
| 112 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 113 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 114 | } |
| 115 | }; |
| 116 | |
| 117 | class Base { |
| 118 | public: |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 119 | static void staticFunction() { |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 120 | printf("__func__ %s\n", __func__); |
| 121 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 122 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 123 | } |
| 124 | |
| 125 | inline void inlineFunction() { |
| 126 | printf("__func__ %s\n", __func__); |
| 127 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 128 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 129 | } |
| 130 | |
| 131 | virtual void virtualFunction() { |
| 132 | printf("__func__ %s\n", __func__); |
| 133 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 134 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 135 | } |
| 136 | |
| 137 | void functionWithParameters(int, float*, Base* base) { |
| 138 | printf("__func__ %s\n", __func__); |
| 139 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 140 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 141 | } |
| 142 | |
| 143 | Base *functionReturningClass() { |
| 144 | printf("__func__ %s\n", __func__); |
| 145 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 146 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 147 | return 0; |
| 148 | } |
| 149 | |
| 150 | void variadicFunction(int, ...) { |
| 151 | printf("__func__ %s\n", __func__); |
| 152 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 153 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 154 | } |
| 155 | |
| 156 | void withTemplateParameter1(ClassTemplate<int>) { |
| 157 | printf("__func__ %s\n", __func__); |
| 158 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 159 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 160 | } |
| 161 | |
| 162 | void withTemplateParameter2(ClassTemplate<Base *>) { |
| 163 | printf("__func__ %s\n", __func__); |
| 164 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 165 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 166 | } |
| 167 | |
| 168 | ClassTemplate<int> functionReturingTemplate1() { |
| 169 | printf("__func__ %s\n", __func__); |
| 170 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 171 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 172 | return ClassTemplate<int>(); |
| 173 | } |
| 174 | |
| 175 | ClassTemplate<Base *> functionReturingTemplate2() { |
| 176 | printf("__func__ %s\n", __func__); |
| 177 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 178 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 179 | return ClassTemplate<Base *>(); |
| 180 | } |
| 181 | |
| 182 | template<typename T> |
| 183 | void functionTemplate1(T t) { |
| 184 | printf("__func__ %s\n", __func__); |
| 185 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 186 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 187 | } |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 188 | |
| 189 | void constFunction() const { |
| 190 | printf("__func__ %s\n", __func__); |
| 191 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 192 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 193 | } |
| 194 | |
| 195 | void volatileFunction() volatile { |
| 196 | printf("__func__ %s\n", __func__); |
| 197 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 198 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 199 | } |
| 200 | |
| 201 | void constVolatileFunction() const volatile { |
| 202 | printf("__func__ %s\n", __func__); |
| 203 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 204 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 205 | } |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 206 | }; |
| 207 | |
| 208 | class Derived : public Base { |
| 209 | public: |
| 210 | // Virtual function without being explicitally written. |
| 211 | void virtualFunction() { |
| 212 | printf("__func__ %s\n", __func__); |
| 213 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 214 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 215 | } |
| 216 | }; |
| 217 | |
| 218 | class Constructor { |
| 219 | public: |
| 220 | Constructor() { |
| 221 | printf("__func__ %s\n", __func__); |
| 222 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 223 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 224 | } |
| 225 | |
| 226 | Constructor(int) { |
| 227 | printf("__func__ %s\n", __func__); |
| 228 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 229 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 230 | } |
| 231 | |
| 232 | Constructor(Base *) { |
| 233 | printf("__func__ %s\n", __func__); |
| 234 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 235 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 236 | } |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 237 | }; |
| 238 | |
| 239 | class Destructor { |
| 240 | public: |
| 241 | ~Destructor() { |
| 242 | printf("__func__ %s\n", __func__); |
| 243 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 244 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 245 | } |
| 246 | }; |
| 247 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 248 | class ContainerForAnonymousRecords { |
| 249 | public: |
| 250 | class { |
| 251 | public: |
| 252 | void anonymousClassFunction() { |
| 253 | printf("__func__ %s\n", __func__); |
| 254 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 255 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 256 | } |
| 257 | } anonymousClass; |
| 258 | |
| 259 | struct { |
| 260 | void anonymousStructFunction() { |
| 261 | printf("__func__ %s\n", __func__); |
| 262 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 263 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 264 | } |
| 265 | } anonymousStruct; |
| 266 | |
| 267 | union { |
| 268 | void anonymousUnionFunction() { |
| 269 | printf("__func__ %s\n", __func__); |
| 270 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 271 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 272 | } |
| 273 | } anonymousUnion; |
| 274 | }; |
| 275 | |
Sam Weinig | 3521d01 | 2009-12-28 03:19:38 +0000 | [diff] [blame^] | 276 | void localClass(int) { |
| 277 | class LocalClass { |
| 278 | public: |
| 279 | void localClassFunction() { |
| 280 | printf("__func__ %s\n", __func__); |
| 281 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 282 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 283 | } |
| 284 | }; |
| 285 | LocalClass lc; |
| 286 | lc.localClassFunction(); |
| 287 | } |
| 288 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 289 | extern void externFunction() { |
| 290 | printf("__func__ %s\n", __func__); |
| 291 | printf("__FUNCTION__ %s\n", __FUNCTION__); |
| 292 | printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__); |
| 293 | } |
| 294 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 295 | } // end NS namespace |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 296 | |
| 297 | int main() { |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 298 | ClassInAnonymousNamespace anonymousNamespace; |
| 299 | anonymousNamespace.anonymousNamespaceFunction(); |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 300 | |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 301 | ClassInTopLevelNamespace topLevelNamespace; |
| 302 | topLevelNamespace.topLevelNamespaceFunction(); |
| 303 | |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 304 | NS::Base::staticFunction(); |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 305 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 306 | NS::Base b; |
| 307 | b.inlineFunction(); |
| 308 | b.virtualFunction(); |
| 309 | b.variadicFunction(0); |
| 310 | b.functionWithParameters(0, 0, 0); |
| 311 | b.functionReturningClass(); |
| 312 | |
| 313 | b.withTemplateParameter1(NS::ClassTemplate<int>()); |
| 314 | b.withTemplateParameter2(NS::ClassTemplate<NS::Base *>()); |
| 315 | b.functionReturingTemplate1(); |
| 316 | b.functionReturingTemplate2(); |
| 317 | b.functionTemplate1<int>(0); |
| 318 | b.functionTemplate1<NS::Base *>(0); |
Sam Weinig | 4eadcc5 | 2009-12-27 01:38:20 +0000 | [diff] [blame] | 319 | b.constFunction(); |
| 320 | b.volatileFunction(); |
| 321 | b.constVolatileFunction(); |
| 322 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 323 | NS::Derived d; |
| 324 | d.virtualFunction(); |
| 325 | |
| 326 | NS::ClassTemplate<int> t1; |
| 327 | t1.classTemplateFunction(); |
| 328 | NS::ClassTemplate<NS::Base *> t2; |
| 329 | t2.classTemplateFunction(); |
| 330 | |
| 331 | NS::Constructor c1; |
| 332 | NS::Constructor c2(0); |
| 333 | NS::Constructor c3((NS::Base *)0); |
| 334 | |
| 335 | { |
| 336 | NS::Destructor destructor; |
| 337 | } |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 338 | |
| 339 | NS::ContainerForAnonymousRecords anonymous; |
| 340 | anonymous.anonymousClass.anonymousClassFunction(); |
| 341 | anonymous.anonymousStruct.anonymousStructFunction(); |
| 342 | anonymous.anonymousUnion.anonymousUnionFunction(); |
| 343 | |
Sam Weinig | 3521d01 | 2009-12-28 03:19:38 +0000 | [diff] [blame^] | 344 | NS::localClass(0); |
| 345 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 346 | NS::externFunction(); |
Sam Weinig | 6be1120 | 2009-12-24 23:15:03 +0000 | [diff] [blame] | 347 | |
Anders Carlsson | 3a082d8 | 2009-09-08 18:24:21 +0000 | [diff] [blame] | 348 | return 0; |
| 349 | } |