Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -verify -o - |FileCheck %s
      2 
      3 class x {
      4 public: int operator=(int);
      5 };
      6 void a() {
      7   x a;
      8   a = 1u;
      9 }
     10 
     11 void 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 }
     20 
     21 // Taken from g++.old-deja/g++.jason/net.C
     22 namespace 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 }
     31