blob: b4712ad15b4b6a1297b40024136e75fc485c0bbd [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
Sam Weinigd5d67782009-09-11 18:49:46 +00002
Douglas Gregorabf65ce2012-04-10 20:14:15 +00003// CHECK: store i32 59, i32* %size
4// CHECK: store i32 65, i32* %size
Sam Weinigd5d67782009-09-11 18:49:46 +00005template<typename T>
6class TemplateClass {
7public:
8 void templateClassFunction() {
9 int size = sizeof(__PRETTY_FUNCTION__);
10 }
11};
12
Douglas Gregorabf65ce2012-04-10 20:14:15 +000013// CHECK: store i32 35, i32* %size
14// CHECK: store i32 38, i32* %size
Sam Weinigd5d67782009-09-11 18:49:46 +000015template<typename T>
16void functionTemplate(T t) {
17 int size = sizeof(__PRETTY_FUNCTION__);
18}
19
20int main() {
21 TemplateClass<int> t1;
22 t1.templateClassFunction();
23 TemplateClass<double> t2;
24 t2.templateClassFunction();
25
26 functionTemplate<int>(0);
27 functionTemplate(0.0);
28
29 return 0;
30}