blob: e19df272c9ad08f44e13846232ce94a3e7dc7af0 [file] [log] [blame]
Douglas Gregor6a03e342010-04-23 04:16:32 +00001// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -verify -o - |FileCheck %s
Eli Friedman88fad632009-11-07 00:02:45 +00002
3class x {
John McCall7002f4c2010-04-09 19:03:51 +00004public: int operator=(int);
Eli Friedman88fad632009-11-07 00:02:45 +00005};
6void a() {
7 x a;
8 a = 1u;
9}
Douglas Gregor6a03e342010-04-23 04:16:32 +000010
11void f(int i, int j) {
12 // CHECK: load i32
13 // CHECK: load i32
14 // CHECK: add nsw i32
15 // CHECK: store i32
16 // CHECK: store i32 17, i32
17 // CHECK: ret
18 (i += j) = 17;
19}
John McCallac516502011-10-28 01:04:34 +000020
21// Taken from g++.old-deja/g++.jason/net.C
22namespace test1 {
23 template <class T> void fn (T t) { }
24 template <class T> struct A {
25 void (*p)(T);
26 A() { p = fn; }
27 };
28
29 A<int> a;
30}