summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp')
-rw-r--r--clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
index b84cec61c31..2e7b58d97a7 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp
@@ -61,9 +61,26 @@ namespace PR10036 {
}
}
+namespace PR15290 {
+ template<typename T>
+ class A {
+ T v_;
+ friend int add_to_v(A &t) noexcept(noexcept(v_ + 42))
+ {
+ return t.v_ + 42;
+ }
+ };
+ void f()
+ {
+ A<int> t;
+ add_to_v(t);
+ }
+}
+
namespace Static {
struct X1 {
int m;
+ // FIXME: This should be accepted.
static auto f() -> decltype(m); // expected-error{{'this' cannot be implicitly used in a static member function declaration}}
static auto g() -> decltype(this->m); // expected-error{{'this' cannot be used in a static member function declaration}}
OpenPOWER on IntegriCloud