Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -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 |