1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu| FileCheck %s
2 // Test itanium mangling for attribute enable_if
3
4 // CHECK: _Z5test1Ua9enable_ifIXeqfL0p_Li1EEEi
test1(int i)5 void test1(int i) __attribute__((enable_if(i == 1, ""))) {}
6
7 void ext();
8 // CHECK: _Z5test2Ua9enable_ifIXneadL_Z3extvELi0EEEi
test2(int i)9 void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {}
10
11 // CHECK: _Z5test3Ua9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEii
test3(int i,int j)12 void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {}
13
14 // CHECK: _ZN5test4IdE1fEUa9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEi
15 template <typename T>
16 class test4 {
17 virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == 2, "")));
18 };
19
20 template class test4<double>;
21