summaryrefslogtreecommitdiff
path: root/test/SemaTemplate
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-07-31 21:00:18 +0000
committerReid Kleckner <reid@kleckner.net>2013-07-31 21:00:18 +0000
commitc66e7e99d5acc560de5cea50909fcea22ef12ca5 (patch)
tree5f7c1aa42f293467576035755bd26ba171753fd9 /test/SemaTemplate
parent78d0fbfe3aa0dcf158fed95a51460e5d769447ee (diff)
downloadclang-c66e7e99d5acc560de5cea50909fcea22ef12ca5.tar.gz
Fix declaring class template methods with an attributed typedef
This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r--test/SemaTemplate/instantiate-function-params.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/SemaTemplate/instantiate-function-params.cpp b/test/SemaTemplate/instantiate-function-params.cpp
index 7ab21c7d7e..5bfae537c0 100644
--- a/test/SemaTemplate/instantiate-function-params.cpp
+++ b/test/SemaTemplate/instantiate-function-params.cpp
@@ -81,18 +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;
- // FIXME: Test a calling convention not supported by this target.
+ __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);
}
}