diff options
Diffstat (limited to 'clang/test/CXX')
-rw-r--r-- | clang/test/CXX/drs/dr0xx.cpp | 5 | ||||
-rw-r--r-- | clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/test/CXX/drs/dr0xx.cpp b/clang/test/CXX/drs/dr0xx.cpp index 5ffc7516f5d..01b1b2aea45 100644 --- a/clang/test/CXX/drs/dr0xx.cpp +++ b/clang/test/CXX/drs/dr0xx.cpp @@ -627,7 +627,7 @@ namespace dr60 { // dr60: yes int &n = f(k); } -namespace dr61 { // dr61: no +namespace dr61 { // dr61: yes struct X { static void f(); } x; @@ -638,8 +638,7 @@ namespace dr61 { // dr61: no // This is (presumably) valid, because x.f does not refer to an overloaded // function name. void (*p)() = &x.f; - // FIXME: This should be rejected. - void (*q)() = &y.f; + void (*q)() = &y.f; // expected-error {{cannot create a non-constant pointer to member function}} } namespace dr62 { // dr62: yes diff --git a/clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp b/clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp index 06cc6107402..cd55cc2441a 100644 --- a/clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp +++ b/clang/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp @@ -38,6 +38,8 @@ namespace test2 { }; void A::test() { - int (A::*ptr)(int) = &(A::foo); // expected-error {{can't form member pointer of type 'int (test2::A::*)(int)' without '&' and class name}} + // FIXME: The error message in this case is less than clear, we can do + // better. + int (A::*ptr)(int) = &(A::foo); // expected-error {{cannot create a non-constant pointer to member function}} } } |