Axel Naumann | 39d26c3 | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -verify %s -Wno-objc-root-class |
Axel Naumann | 38c3bb4 | 2012-10-02 12:18:46 +0000 | [diff] [blame] | 3 | // RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | grep Emit | FileCheck %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame^] | 4 | // expected-no-diagnostics |
Axel Naumann | 39d26c3 | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 5 | |
| 6 | @__experimental_modules_import templates_left; |
| 7 | @__experimental_modules_import templates_right; |
| 8 | |
| 9 | |
| 10 | void testTemplateClasses() { |
| 11 | Vector<int> vec_int; |
| 12 | vec_int.push_back(0); |
| 13 | |
| 14 | List<bool> list_bool; |
| 15 | list_bool.push_back(false); |
| 16 | |
| 17 | N::Set<char> set_char; |
| 18 | set_char.insert('A'); |
| 19 | } |
| 20 | |
| 21 | void testPendingInstantiations() { |
Axel Naumann | 38c3bb4 | 2012-10-02 12:18:46 +0000 | [diff] [blame] | 22 | // CHECK: call {{.*pendingInstantiationEmit}} |
| 23 | // CHECK: call {{.*pendingInstantiationEmit}} |
| 24 | // CHECK: define {{.*pendingInstantiationEmit.*[(]i}} |
| 25 | // CHECK: define {{.*pendingInstantiationEmit.*[(]double}} |
Axel Naumann | 39d26c3 | 2012-10-02 09:09:43 +0000 | [diff] [blame] | 26 | triggerPendingInstantiation(); |
| 27 | triggerPendingInstantiationToo(); |
| 28 | } |
Axel Naumann | 38c3bb4 | 2012-10-02 12:18:46 +0000 | [diff] [blame] | 29 | |
| 30 | void testRedeclDefinition() { |
| 31 | // CHECK: define {{.*redeclDefinitionEmit}} |
| 32 | redeclDefinitionEmit(); |
| 33 | } |
| 34 | |
| 35 | // CHECK: call {{.*pendingInstantiation}} |
| 36 | // CHECK: call {{.*redeclDefinitionEmit}} |