summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/member-expressions.cpp
blob: 223bab55e64af0a98bef4b7e6c70a905ae13f2a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s

// PR5392
namespace PR5392 {
struct A
{
  static int a;
};

A a1;
void f()
{
  // CHECK: store i32 10, i32* @_ZN6PR53921A1aE
  a1.a = 10;
  // CHECK: store i32 20, i32* @_ZN6PR53921A1aE
  A().a = 20;
}

}

struct A {
  enum E { Foo };
};

void f(A *a) {
  A::E e = a->Foo;
}
OpenPOWER on IntegriCloud