Fariborz Jahanian | 5de2450 | 2009-10-28 16:49:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only -verify %s -std=c++0x |
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 |