brintos

brintos / llvm-project-archived public Read only

0
0
Text · 545 B · b69eadf Raw
27 lines · cpp
1// RUN: cp %s %t2// RUN: %clang_cc1 -pedantic -fixit -x c++ %t3// RUN: %clang_cc1 -fsyntax-only -pedantic -Werror -x c++ %t4// XFAIL: *5 6/* This is a test of the various code modification hints that are7   provided as part of warning or extension diagnostics. All of the8   warnings will be fixed by -fixit, and the resulting file should9   compile cleanly with -Werror -pedantic. */10 11struct  S {12	int i;13};14 15int foo(int S::* ps, S s, S* p)16{17  p.*ps = 1;18  return s->*ps;19}20 21void foo1(int (S::*ps)(), S s, S* p)22{23  (p.*ps)();24  (s->*ps)();25}26 27