From 51fb8b013e7734b795139f49d3b1f77c539be20a Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Wed, 4 Nov 2009 15:04:32 +0000 Subject: Update clang to r86025. --- test/FixIt/fixit-pmem.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/FixIt/fixit-pmem.cpp (limited to 'test/FixIt/fixit-pmem.cpp') diff --git a/test/FixIt/fixit-pmem.cpp b/test/FixIt/fixit-pmem.cpp new file mode 100644 index 0000000000000..bb36f7fa9343d --- /dev/null +++ b/test/FixIt/fixit-pmem.cpp @@ -0,0 +1,23 @@ +// RUN: clang-cc -fsyntax-only -pedantic -fixit %s -o - | clang-cc -fsyntax-only -pedantic -Werror -x c++ - + +/* This is a test of the various code modification hints that are + provided as part of warning or extension diagnostics. All of the + warnings will be fixed by -fixit, and the resulting file should + compile cleanly with -Werror -pedantic. */ + +struct S { + int i; +}; + +int foo(int S::* ps, S s, S* p) +{ + p.*ps = 1; + return s->*ps; +} + +void foo1(int (S::*ps)(), S s, S* p) +{ + (p.*ps)(); + (s->*ps)(); +} + -- cgit v1.2.3