1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
2f4a2713aSLionel Sambuc // Insure that dbg.declare lines for locals refer to correct line number records.
3f4a2713aSLionel Sambuc // Radar 8152866.
foo()4f4a2713aSLionel Sambuc void foo() {
5f4a2713aSLionel Sambuc int l = 0; // line #4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
6f4a2713aSLionel Sambuc int p = 0; // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
7f4a2713aSLionel Sambuc }
8f4a2713aSLionel Sambuc // Now match the line number records:
9*0a6a1f1dSLionel Sambuc // CHECK: {{^}}[[variable_l]] = !MDLocation(line: 5,
10*0a6a1f1dSLionel Sambuc // CHECK: {{^}}[[variable_p]] = !MDLocation(line: 6,
11