Clang Project

clang_source_code/test/CodeGenObjCXX/instantiate-return.mm
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -o - %s | FileCheck %s
2
3template <class T>
4struct TemplateClass {
5  int a = 0;
6};
7
8struct S0;
9
10@interface C1
11- (TemplateClass<S0>)m1;
12@end
13
14// This code used to assert in CodeGen because the return type TemplateClass<S0>
15// wasn't instantiated.
16
17// CHECK: define internal i32 @"\01-[C1 m1]"(
18
19@implementation C1
20- (TemplateClass<S0>)m1 {
21}
22@end
23