[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / enable_if.cpp
blob70386b87fcee36c38edbb747fb5cbcfdddee3183
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu | FileCheck %s
3 // Test address-of overloading logic
4 int test5(int);
5 template <typename T>
6 T test5(T) __attribute__((enable_if(1, "better than non-template")));
8 // CHECK: @_Z5test5IiEUa9enable_ifILi1EET_S0_
9 int (*Ptr)(int) = &test5;
11 // Test itanium mangling for attribute enable_if
13 // CHECK: _Z5test1Ua9enable_ifIXeqfL0p_Li1EEEi
14 void test1(int i) __attribute__((enable_if(i == 1, ""))) {}
16 void ext();
17 // CHECK: _Z5test2Ua9enable_ifIXneadL_Z3extvELi0EEEi
18 void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {}
20 // CHECK: _Z5test3Ua9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEii
21 void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {}
23 // CHECK: _ZN5test4IdE1fEUa9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEi
24 template <typename T>
25 class test4 {
26 virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == 2, "")));
29 template class test4<double>;