From 356e3e0c6a9b0749a7b7dd112a2848503e0ff01c Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 25 Aug 2010 00:28:56 +0000 Subject: Fix 'for' loop variables' scope. llvm-svn: 112002 --- clang/test/CodeGen/debug-info-scope.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 clang/test/CodeGen/debug-info-scope.c (limited to 'clang/test/CodeGen/debug-info-scope.c') diff --git a/clang/test/CodeGen/debug-info-scope.c b/clang/test/CodeGen/debug-info-scope.c new file mode 100644 index 00000000000..6051e6ed0fe --- /dev/null +++ b/clang/test/CodeGen/debug-info-scope.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s +// Two variables with same name in separate scope. +// Radar 8330217. +int main() { + int j = 0; + int k = 0; +// CHECK: DW_TAG_auto_variable +// CHECK-NEXT: DW_TAG_lexical_block + for (int i = 0; i < 10; i++) + j++; + for (int i = 0; i < 10; i++) + k++; + return 0; +} -- cgit v1.2.3