summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/explicit-instantiation.cpp
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2013-07-19 23:00:19 +0000
committerLarisse Voufo <lvoufo@google.com>2013-07-19 23:00:19 +0000
commit98b20f1278e097f9f56b0c3bdb6740e230a47832 (patch)
tree6d127a92bd1758f9fe11e4a9f0579221acd1519c /clang/test/SemaTemplate/explicit-instantiation.cpp
parent47c0845e0b388966ae8b9245057b3b2ba89bd589 (diff)
downloadbcm5719-llvm-98b20f1278e097f9f56b0c3bdb6740e230a47832.tar.gz
bcm5719-llvm-98b20f1278e097f9f56b0c3bdb6740e230a47832.zip
FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations
This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info. llvm-svn: 186730
Diffstat (limited to 'clang/test/SemaTemplate/explicit-instantiation.cpp')
-rw-r--r--clang/test/SemaTemplate/explicit-instantiation.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/test/SemaTemplate/explicit-instantiation.cpp b/clang/test/SemaTemplate/explicit-instantiation.cpp
index e3e77d08284..04a863bdc17 100644
--- a/clang/test/SemaTemplate/explicit-instantiation.cpp
+++ b/clang/test/SemaTemplate/explicit-instantiation.cpp
@@ -15,9 +15,9 @@ struct X0 {
return x + 1; // expected-error{{invalid operands}}
}
T* f0(T*, T*) { return T(); } // expected-warning{{expression which evaluates to zero treated as a null pointer constant of type 'int *'}}
-
- template<typename U>
- T f0(T, U) { return T(); }
+
+ template <typename U> T f0(T, U) { return T(); } // expected-note {{candidate template ignored: could not match 'int (int, U)' against 'int (int) const'}} \
+ // expected-note {{candidate template ignored: could not match 'int' against 'int *'}}
};
template<typename T>
@@ -59,13 +59,14 @@ template int *X2::f1(int *); // okay
template void X2::f2(int *, int *); // expected-error{{ambiguous}}
-
-template<typename T> void print_type() { }
+template <typename T>
+void print_type() {} // expected-note {{candidate template ignored: could not match 'void ()' against 'void (float *)'}}
template void print_type<int>();
template void print_type<float>();
-template<typename T> void print_type(T*) { }
+template <typename T>
+void print_type(T *) {} // expected-note {{candidate template ignored: could not match 'void (int *)' against 'void (float *)'}}
template void print_type(int*);
template void print_type<int>(float*); // expected-error{{does not refer}}
@@ -94,7 +95,7 @@ namespace PR7622 {
template<typename,typename>
struct basic_streambuf{friend bob<>()}; // expected-error{{unknown type name 'bob'}} \
- // expected-error{{expected member name or ';' after declaration specifiers}}
+ // expected-error{{expected member name or ';' after declaration specifiers}}
template struct basic_streambuf<int>;
}
OpenPOWER on IntegriCloud