diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-16 03:49:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-02-16 03:49:44 +0000 |
commit | b5e3458bd2a56765b32efb4652bb535eedcf19a6 (patch) | |
tree | ef0592e5f943024316eebac979016e804793c8df /test/SemaTemplate/deduction.cpp | |
parent | 78da9c113ee411d858c57960ee3a479ad79f4312 (diff) | |
download | clang-b5e3458bd2a56765b32efb4652bb535eedcf19a6.tar.gz |
Add missing "deduced A == A" check for function template partial ordering.
This appears to be the only template argument deduction context where we were
missing this check. Surprisingly, other implementations also appear to miss
the check in this case; it may turn out that important code is relying on
the widespread non-conformance here, in which case we'll need to reconsider.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 16e01a9346..f2d0505726 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -127,12 +127,12 @@ namespace test1 { namespace test2 { template<typename T> struct Const { typedef void const type; }; - template<typename T> void f(T, typename Const<T>::type*); - template<typename T> void f(T, void const *); + template<typename T> void f(T, typename Const<T>::type*); // expected-note {{candidate}} + template<typename T> void f(T, void const *); // expected-note {{candidate}} void test() { void *p = 0; - f(0, p); + f(0, p); // expected-error {{ambiguous}} } } |