diff options
Diffstat (limited to 'test/SemaTemplate/fun-template-def.cpp')
-rw-r--r-- | test/SemaTemplate/fun-template-def.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaTemplate/fun-template-def.cpp b/test/SemaTemplate/fun-template-def.cpp index 0427781218..2d515b4b15 100644 --- a/test/SemaTemplate/fun-template-def.cpp +++ b/test/SemaTemplate/fun-template-def.cpp @@ -46,3 +46,11 @@ T f1(T t1, U u1, int i1) return u1; } + +template<typename T> +void f2(__restrict T x) {} // expected-note {{substitution failure [with T = int]: restrict requires a pointer or reference ('int' is invalid}} + +void f3() { + f2<int*>(0); + f2<int>(0); // expected-error {{no matching function for call to 'f2'}} +} |