xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/debug-info-scope.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
2*f4a2713aSLionel Sambuc // Two variables with same name in separate scope.
3*f4a2713aSLionel Sambuc // Radar 8330217.
4*f4a2713aSLionel Sambuc int main() {
5*f4a2713aSLionel Sambuc 	int j = 0;
6*f4a2713aSLionel Sambuc 	int k = 0;
7*f4a2713aSLionel Sambuc // CHECK: DW_TAG_auto_variable ] [i]
8*f4a2713aSLionel Sambuc // CHECK-NEXT: DW_TAG_lexical_block
9*f4a2713aSLionel Sambuc 	for (int i = 0; i < 10; i++)
10*f4a2713aSLionel Sambuc 		j++;
11*f4a2713aSLionel Sambuc // CHECK: DW_TAG_auto_variable ] [i]
12*f4a2713aSLionel Sambuc // CHECK-NEXT: DW_TAG_lexical_block
13*f4a2713aSLionel Sambuc 	for (int i = 0; i < 10; i++)
14*f4a2713aSLionel Sambuc 		k++;
15*f4a2713aSLionel Sambuc 	return 0;
16*f4a2713aSLionel Sambuc }
17