1f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-linux-gnu  %s -o - | FileCheck %s
2f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher
3f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher// Make sure that the union type has template parameters.
4f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher
5f068c92f22cc5c42433f5bd37b000a714a56670fEric Christophernamespace PR15637 {
6f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher  template <typename T> union Value { int a; };
7f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher  void g(float value) {
8f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher    Value<float> tempValue;
9f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher  }
10f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher  Value<float> f;
11f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher}
12f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher
1383369bf8f6244f20ae8bfa2fcb3a556f94da27deManman Ren// CHECK: {{.*}}, metadata !"Value<float>", {{.*}}, null, metadata [[TTPARAM:.*]], metadata !"_ZTSN7PR156375ValueIfEE"} ; [ DW_TAG_union_type ] [Value<float>]
14f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher// CHECK: [[TTPARAM]] = metadata !{metadata [[PARAMS:.*]]}
15f068c92f22cc5c42433f5bd37b000a714a56670fEric Christopher// CHECK: [[PARAMS]] = metadata !{{{.*}}metadata !"T",{{.*}}} ; [ DW_TAG_template_type_parameter ]
16