blob: a9b45913c7550b11d3cd43bf026e7e5750919fa5 [file] [log] [blame]
Axel Naumann63469422c2012-10-02 09:09:43 +00001// 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
3// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs -emit-llvm %s -o - -Wno-objc-root-class | grep pendingInstantiation | FileCheck %s
4
5@__experimental_modules_import templates_left;
6@__experimental_modules_import templates_right;
7
8
9void testTemplateClasses() {
10 Vector<int> vec_int;
11 vec_int.push_back(0);
12
13 List<bool> list_bool;
14 list_bool.push_back(false);
15
16 N::Set<char> set_char;
17 set_char.insert('A');
18}
19
20void testPendingInstantiations() {
21 // CHECK: call
22 // CHECK: call
23 // CHECK: {{define .*pendingInstantiation.*[(]i}}
24 // CHECK: {{define .*pendingInstantiation.*[(]double}}
25 // CHECK: call
26 triggerPendingInstantiation();
27 triggerPendingInstantiationToo();
28}