diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaTemplate/instantiation-default-1.cpp | 3 | ||||
| -rw-r--r-- | clang/test/SemaTemplate/instantiation-default-2.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/SemaTemplate/instantiation-default-1.cpp b/clang/test/SemaTemplate/instantiation-default-1.cpp index 57071f46402..3060fdc6fd6 100644 --- a/clang/test/SemaTemplate/instantiation-default-1.cpp +++ b/clang/test/SemaTemplate/instantiation-default-1.cpp @@ -32,7 +32,8 @@ void test_Def2(Def2<int, int const*> *d2) { d2->foo(); } -Def2<int&> *d2; +typedef int& int_ref_t; +Def2<int_ref_t> *d2; // expected-note{{in instantiation of default argument for 'Def2<int &>' required here}} template<> struct Def1<const int, const int> { }; // expected-error{{redefinition of 'Def1'}} diff --git a/clang/test/SemaTemplate/instantiation-default-2.cpp b/clang/test/SemaTemplate/instantiation-default-2.cpp index e91a98e2f71..9d6b047f377 100644 --- a/clang/test/SemaTemplate/instantiation-default-2.cpp +++ b/clang/test/SemaTemplate/instantiation-default-2.cpp @@ -15,4 +15,4 @@ Constant<float (*)(int, double), &f> *c5; Constant<float (*)(int, int), f> *c6; // expected-error{{non-type template argument of type 'float (*)(int, double)' cannot be converted to a value of type 'float (*)(int, int)'}} -Constant<float, 0> *c7; +Constant<float, 0> *c7; // expected-note{{in instantiation of default argument for 'Constant<float>' required here}} |

