diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/CodeGenCXX/enable_if.cpp | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'test/CodeGenCXX/enable_if.cpp')
-rw-r--r-- | test/CodeGenCXX/enable_if.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenCXX/enable_if.cpp b/test/CodeGenCXX/enable_if.cpp new file mode 100644 index 0000000..00c55c7 --- /dev/null +++ b/test/CodeGenCXX/enable_if.cpp @@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu| FileCheck %s +// Test itanium mangling for attribute enable_if + +// CHECK: _Z5test1Ua9enable_ifIXeqfL0p_Li1EEEi +void test1(int i) __attribute__((enable_if(i == 1, ""))) {} + +void ext(); +// CHECK: _Z5test2Ua9enable_ifIXneadL_Z3extvELi0EEEi +void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {} + +// CHECK: _Z5test3Ua9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEii +void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {} + +// CHECK: _ZN5test4IdE1fEUa9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEi +template <typename T> +class test4 { + virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == 2, ""))); +}; + +template class test4<double>; |