Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / mangle-this-cxx11.cpp
blobdcc487c0e5c52336ec81d9cffc58a69b0bc47b00
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
3 struct B {
4 template <class U> U f();
5 };
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>());
14 int main() {
15 A a;
16 // CHECK: call noundef i32 @_ZN1A1fIiEEDTcldtdtdefpT1b1fIT_EEEv
17 a.f<int>();
18 // CHECK: call noundef i32 @_ZN1A1gIiEEDTcldtptfpT1b1fIT_EEEv
19 a.g<int>();