Files
clang-p2996/lldb/test/lang/cpp/static_members/main.cpp
Daniel Malea 9e84eb41f6 Add a test case for static member variables
- expected to fail across the board due to llvm.org/pr15401

Patch by Ashok Thirumurthi!

llvm-svn: 176362
2013-03-01 18:25:42 +00:00

37 lines
677 B
C++

//===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include <stdio.h>
struct A
{
short m_a;
static long s_b;
char m_c;
static int s_d;
long access() {
return m_a + s_b + m_c + s_d; // breakpoint 2
}
};
long A::s_b = 2;
int A::s_d = 4;
int main()
{
A my_a;
my_a.m_a = 1;
my_a.m_c = 3;
my_a.access(); // breakpoint 1
return 0;
}