Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / predefined-expr-sizeof.cpp
bloba80ec8124ad77ed1473b23a343f2c817621520c9
1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
3 // CHECK: store i32 59, ptr %size
4 // CHECK: store i32 65, ptr %size
5 template<typename T>
6 class TemplateClass {
7 public:
8 void templateClassFunction() {
9 int size = sizeof(__PRETTY_FUNCTION__);
13 // CHECK: store i32 35, ptr %size
14 // CHECK: store i32 38, ptr %size
15 template<typename T>
16 void functionTemplate(T t) {
17 int size = sizeof(__PRETTY_FUNCTION__);
20 int main() {
21 TemplateClass<int> t1;
22 t1.templateClassFunction();
23 TemplateClass<double> t2;
24 t2.templateClassFunction();
26 functionTemplate<int>(0);
27 functionTemplate(0.0);
29 return 0;