brintos

brintos / llvm-project-archived public Read only

0
0
Text · 375 B · 7e8d584 Raw
18 lines · cpp
1// Make sure foo is instantiated and we don't get a link error2// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o- | FileCheck %s3 4template <typename T>5constexpr T foo(T a);6 7// CHECK-LABEL: define {{.*}} @main8int main() {9  // CHECK: call {{.*}} @_Z3fooIiET_S0_10  int k = foo<int>(5);11}12// CHECK: }13 14template <typename T>15constexpr T foo(T a) {16  return a;17}18