1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s 2*0a6a1f1dSLionel Sambuc // Test that the line table info for Foo<T>::bar() is pointing to the 3*0a6a1f1dSLionel Sambuc // right header file. 4*0a6a1f1dSLionel Sambuc // CHECK: define{{.*}}bar 5*0a6a1f1dSLionel Sambuc // CHECK-NOT: define 6*0a6a1f1dSLionel Sambuc // CHECK: ret {{.*}}, !dbg [[DBG:.*]] 7*0a6a1f1dSLionel Sambuc // CHECK: [[HPP:.*]] = !{!"./template.hpp", 8*0a6a1f1dSLionel Sambuc // CHECK: [[SP:.*]] = !{!"0x2e\00{{.*}}", [[HPP]],{{.*}}[ DW_TAG_subprogram ] [line 22] [def] [bar] 9*0a6a1f1dSLionel Sambuc // We shouldn't need a lexical block for this function. 10*0a6a1f1dSLionel Sambuc // CHECK: [[DBG]] = !MDLocation(line: 23, scope: [[SP]]) 11*0a6a1f1dSLionel Sambuc 12*0a6a1f1dSLionel Sambuc 13*0a6a1f1dSLionel Sambuc # 1 "./template.h" 1 14*0a6a1f1dSLionel Sambuc template <typename T> 15*0a6a1f1dSLionel Sambuc class Foo { 16*0a6a1f1dSLionel Sambuc public: 17*0a6a1f1dSLionel Sambuc int bar(); 18*0a6a1f1dSLionel Sambuc }; 19*0a6a1f1dSLionel Sambuc # 21 "./template.hpp" 20*0a6a1f1dSLionel Sambuc template <typename T> bar()21*0a6a1f1dSLionel Sambucint Foo<T>::bar() { 22*0a6a1f1dSLionel Sambuc return 23; 23*0a6a1f1dSLionel Sambuc } main(int argc,const char * argv[])24*0a6a1f1dSLionel Sambucint main (int argc, const char * argv[]) 25*0a6a1f1dSLionel Sambuc { 26*0a6a1f1dSLionel Sambuc Foo<int> f; 27*0a6a1f1dSLionel Sambuc return f.bar(); 28*0a6a1f1dSLionel Sambuc } 29