2012-10-02 17:09:43 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -verify %s -Wno-objc-root-class
|
2012-10-02 20:18:46 +08:00
|
|
|
// 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
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2012-10-02 17:09:43 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import templates_left;
|
|
|
|
@import templates_right;
|
2012-10-02 17:09:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
void testTemplateClasses() {
|
|
|
|
Vector<int> vec_int;
|
|
|
|
vec_int.push_back(0);
|
|
|
|
|
|
|
|
List<bool> list_bool;
|
|
|
|
list_bool.push_back(false);
|
|
|
|
|
|
|
|
N::Set<char> set_char;
|
|
|
|
set_char.insert('A');
|
|
|
|
}
|
|
|
|
|
|
|
|
void testPendingInstantiations() {
|
2012-10-02 20:18:46 +08:00
|
|
|
// CHECK: call {{.*pendingInstantiationEmit}}
|
|
|
|
// CHECK: call {{.*pendingInstantiationEmit}}
|
|
|
|
// CHECK: define {{.*pendingInstantiationEmit.*[(]i}}
|
|
|
|
// CHECK: define {{.*pendingInstantiationEmit.*[(]double}}
|
2012-10-02 17:09:43 +08:00
|
|
|
triggerPendingInstantiation();
|
|
|
|
triggerPendingInstantiationToo();
|
|
|
|
}
|
2012-10-02 20:18:46 +08:00
|
|
|
|
|
|
|
void testRedeclDefinition() {
|
|
|
|
// CHECK: define {{.*redeclDefinitionEmit}}
|
|
|
|
redeclDefinitionEmit();
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: call {{.*pendingInstantiation}}
|
|
|
|
// CHECK: call {{.*redeclDefinitionEmit}}
|