Work around a bug in LLDB (it finds the wrong "C", rdar://problem/14933867)

and enable this test on Darwin.

llvm-svn: 203324
This commit is contained in:
Adrian Prantl 2014-03-08 01:03:55 +00:00
parent 26ab6c6dd5
commit 32347758b3
1 changed files with 11 additions and 12 deletions

View File

@ -1,26 +1,25 @@
// RUN: %clangxx -O0 -g %s -o %t -c
// RUN: %clangxx %t -o %t.out
// RUN: %test_debuginfo %s %t.out
// XFAIL: darwin
// DEBUGGER: delete breakpoints
// DEBUGGER: break static-member.cpp:33
// DEBUGGER: r
// DEBUGGER: ptype C
// CHECK: {{struct|class}} C {
// DEBUGGER: ptype MyClass
// CHECK: {{struct|class}} MyClass {
// CHECK: static const int a;
// CHECK-NEXT: static int b;
// CHECK-NEXT: static int c;
// CHECK-NEXT: int d;
// CHECK-NEXT: }
// DEBUGGER: p C::a
// CHECK: $1 = 4
// DEBUGGER: p C::c
// CHECK: $2 = 15
// DEBUGGER: p MyClass::a
// CHECK: ${{[0-9]}} = 4
// DEBUGGER: p MyClass::c
// CHECK: ${{[0-9]}} = 15
// PR14471, PR14734
class C {
class MyClass {
public:
const static int a = 4;
static int b;
@ -28,10 +27,10 @@ public:
int d;
};
int C::c = 15;
const int C::a;
int MyClass::c = 15;
const int MyClass::a;
int main() {
C instance_C;
return C::a;
MyClass instance_MyClass;
return MyClass::a;
}