aboutsummaryrefslogtreecommitdiffstats
path: root/test/C++Frontend/2008-01-25-ResultIsParam.cpp
blob: eae402786b46e442f474f9e92172653520707c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %llvmgcc %s -S -o - | not grep {@_ZN3fooC1Ev.*result}
// PR1942

class foo
{
public:
  int a;
  int b;

  foo(void) : a(0), b(0) {}

  foo(int aa, int bb) : a(aa), b(bb) {}

  const foo operator+(const foo& in) const;

};

const foo foo::operator+(const foo& in) const {
  foo Out;
  Out.a = a + in.a;
  Out.b = b + in.b;
  return Out;
}