blob: bb36f7fa9343d2eb34a2aa0c747cda5b70e54dbe [file] [log] [blame]
Fariborz Jahanianef78ac62009-10-26 20:45:27 +00001// RUN: clang-cc -fsyntax-only -pedantic -fixit %s -o - | clang-cc -fsyntax-only -pedantic -Werror -x c++ -
2
3/* This is a test of the various code modification hints that are
4 provided as part of warning or extension diagnostics. All of the
5 warnings will be fixed by -fixit, and the resulting file should
6 compile cleanly with -Werror -pedantic. */
7
8struct S {
9 int i;
10};
11
12int foo(int S::* ps, S s, S* p)
13{
14 p.*ps = 1;
15 return s->*ps;
16}
17
18void foo1(int (S::*ps)(), S s, S* p)
19{
20 (p.*ps)();
21 (s->*ps)();
22}
23