diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-09 22:06:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-09 22:06:46 +0000 |
commit | 0c83c8128b0e0befafb48899f3abff088c9a081c (patch) | |
tree | 7d69ddef3a7706a9bcb632a943955044b2f09319 /clang/test | |
parent | 1deb5b61f4ba5c56afe8cf72da909c7cb9c8c478 (diff) | |
download | bcm5719-llvm-0c83c8128b0e0befafb48899f3abff088c9a081c.tar.gz bcm5719-llvm-0c83c8128b0e0befafb48899f3abff088c9a081c.zip |
Per the note in C++0x [temp.deduct.call]p4, don't attempt template
argument deduction against a function parameter that has no deducible
template parameters in it. Fixes PR8598.
llvm-svn: 141517
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p4.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p4.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p4.cpp new file mode 100644 index 00000000000..9236efce2b8 --- /dev/null +++ b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.call/p4.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +namespace PR8598 { + template<class T> struct identity { typedef T type; }; + + template<class T, class C> + void f(T C::*, typename identity<T>::type*){} + + struct X { void f() {}; }; + + void g() { (f)(&X::f, 0); } +} |