summaryrefslogtreecommitdiff
path: root/test/CXX/expr/expr.prim/expr.prim.general
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-03-26 22:43:55 +0000
committerDouglas Gregor <dgregor@apple.com>2013-03-26 22:43:55 +0000
commite79ce292d93f955c1219c3977c02199bd3dc6544 (patch)
tree1e7ec39a92c59dd055053b34a8a621233f43ef05 /test/CXX/expr/expr.prim/expr.prim.general
parentd74505e985976c3ef0170360174d863821c6165c (diff)
downloadclang-e79ce292d93f955c1219c3977c02199bd3dc6544.tar.gz
<rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.general')
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
index 2e7b58d97a..66579915c7 100644
--- a/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
@@ -116,3 +116,23 @@ namespace PR12564 {
void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} // expected-error {{cannot bind to a value of unrelated type}}
};
}
+
+namespace rdar13473493 {
+ template <typename F>
+ class wrap
+ {
+ public:
+ template <typename... Args>
+ auto operator()(Args&&... args) const -> decltype(wrapped(args...)) // expected-note{{candidate template ignored: substitution failure [with Args = <int>]: use of undeclared identifier 'wrapped'}}
+ {
+ return wrapped(args...);
+ }
+
+ private:
+ F wrapped;
+ };
+
+ void test(wrap<int (*)(int)> w) {
+ w(5); // expected-error{{no matching function for call to object of type 'wrap<int (*)(int)>'}}
+ }
+}