1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
2
3 struct B {
4 template <class U> U f();
5 };
6
7 struct A {
8 B b;
9 // implicitly rewritten to (*this).b.f<U>()
10 template <class U> auto f() -> decltype (b.f<U>());
11 template <class U> auto g() -> decltype (this->b.f<U>());
12 };
13
main()14 int main() {
15 A a;
16 // CHECK: call i32 @_ZN1A1fIiEEDTcldtdtdefpT1b1fIT_EEEv
17 a.f<int>();
18 // CHECK: call i32 @_ZN1A1gIiEEDTcldtptfpT1b1fIT_EEEv
19 a.g<int>();
20 }
21