mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 09:06:06 +00:00

Conversion done using the script at https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34. These are tests where the conversion worked out of the box and no manual fixup was performed.
31 lines
616 B
C++
31 lines
616 B
C++
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
|
|
// CHECK: store i32 59, ptr %size
|
|
// CHECK: store i32 65, ptr %size
|
|
template<typename T>
|
|
class TemplateClass {
|
|
public:
|
|
void templateClassFunction() {
|
|
int size = sizeof(__PRETTY_FUNCTION__);
|
|
}
|
|
};
|
|
|
|
// CHECK: store i32 35, ptr %size
|
|
// CHECK: store i32 38, ptr %size
|
|
template<typename T>
|
|
void functionTemplate(T t) {
|
|
int size = sizeof(__PRETTY_FUNCTION__);
|
|
}
|
|
|
|
int main() {
|
|
TemplateClass<int> t1;
|
|
t1.templateClassFunction();
|
|
TemplateClass<double> t2;
|
|
t2.templateClassFunction();
|
|
|
|
functionTemplate<int>(0);
|
|
functionTemplate(0.0);
|
|
|
|
return 0;
|
|
}
|