| Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x |
| Fariborz Jahanian | 5de2450 | 2009-10-28 16:49:46 +0000 | [diff] [blame] | 2 | |
| 3 | struct S { | ||||
| 4 | int i; | ||||
| 5 | |||||
| 6 | int mem(int); | ||||
| 7 | }; | ||||
| 8 | |||||
| 9 | int foo(int S::* ps, S *s) | ||||
| 10 | { | ||||
| 11 | return (s->*ps)(1); // expected-error {{called object type 'int' is not a function or function pointer}} | ||||
| 12 | } | ||||
| 13 | |||||