summaryrefslogtreecommitdiffstats
path: root/test/SemaTemplate/instantiate-function-params.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/SemaTemplate/instantiate-function-params.cpp
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'test/SemaTemplate/instantiate-function-params.cpp')
-rw-r--r--test/SemaTemplate/instantiate-function-params.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/SemaTemplate/instantiate-function-params.cpp b/test/SemaTemplate/instantiate-function-params.cpp
index 54847e4..5bfae53 100644
--- a/test/SemaTemplate/instantiate-function-params.cpp
+++ b/test/SemaTemplate/instantiate-function-params.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple i686-unknown-unknown -fsyntax-only -verify %s
// PR6619
template<bool C> struct if_c { };
@@ -81,10 +81,21 @@ namespace InstantiateFunctionTypedef {
template<typename T>
struct X {
typedef int functype(int, int);
- functype func;
+ functype func1;
+ __attribute__((noreturn)) functype func2;
+
+ typedef int stdfunctype(int, int) __attribute__((stdcall));
+ __attribute__((stdcall)) functype stdfunc1;
+ stdfunctype stdfunc2;
+
+ __attribute__((pcs("aapcs"))) functype pcsfunc; // expected-warning {{calling convention 'pcs' ignored for this target}}
};
void f(X<int> x) {
- (void)x.func(1, 2);
+ (void)x.func1(1, 2);
+ (void)x.func2(1, 2);
+ (void)x.stdfunc1(1, 2);
+ (void)x.stdfunc2(1, 2);
+ (void)x.pcsfunc(1, 2);
}
}
OpenPOWER on IntegriCloud