summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/trailing-return-0x.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-20 12:41:22 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-20 12:41:22 +0000
commit0feaf0c7e3e1349907f38edf9e7635500bf85cc3 (patch)
treef92b73081a9e1969992ab244b3cbe9a92e98a2f3 /clang/test/SemaCXX/trailing-return-0x.cpp
parent16aba1702434c56c78e1ea7fe55be81d88e0f443 (diff)
downloadbcm5719-llvm-0feaf0c7e3e1349907f38edf9e7635500bf85cc3.tar.gz
bcm5719-llvm-0feaf0c7e3e1349907f38edf9e7635500bf85cc3.zip
Implement core issue 1608: class members can be found via operator lookup in a trailing return type in that class's body.
llvm-svn: 179941
Diffstat (limited to 'clang/test/SemaCXX/trailing-return-0x.cpp')
-rw-r--r--clang/test/SemaCXX/trailing-return-0x.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/trailing-return-0x.cpp b/clang/test/SemaCXX/trailing-return-0x.cpp
index 462b4fa3da0..bd601db2ac1 100644
--- a/clang/test/SemaCXX/trailing-return-0x.cpp
+++ b/clang/test/SemaCXX/trailing-return-0x.cpp
@@ -85,3 +85,12 @@ namespace PR12053 {
f2(0); // expected-error{{no matching function for call to 'f2'}}
}
}
+
+namespace DR1608 {
+ struct S {
+ void operator+();
+ int operator[](int);
+ auto f() -> decltype(+*this); // expected-note {{here}}
+ auto f() -> decltype((*this)[0]); // expected-error {{cannot be overloaded}}
+ };
+}
OpenPOWER on IntegriCloud