summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-04-24 01:30:46 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-04-24 01:30:46 +0000
commit784fad7a4134c9504f7c3efa292e8a7b43155a2c (patch)
tree9403fc2b930f161d3f736e2c8b06ecf50d851836 /clang/test/FixIt/fixit.cpp
parent48ff3cf63bfa8019aca9b5df5f9fa496033c60cb (diff)
downloadbcm5719-llvm-784fad7a4134c9504f7c3efa292e8a7b43155a2c.tar.gz
bcm5719-llvm-784fad7a4134c9504f7c3efa292e8a7b43155a2c.zip
Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
files with the additional suffix in the middle. llvm-svn: 102230
Diffstat (limited to 'clang/test/FixIt/fixit.cpp')
-rw-r--r--clang/test/FixIt/fixit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp
index f596226e9f1..b9282c4d948 100644
--- a/clang/test/FixIt/fixit.cpp
+++ b/clang/test/FixIt/fixit.cpp
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -pedantic -Wall -fixit %s -o - | %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ -
+// RUN: cp %s %t
+// RUN: %clang_cc1 -pedantic -Wall -fixit -x c++ %t || true
+// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -x c++ %t
/* 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 C1 {
+struct C1 {
virtual void f();
static void g();
};
@@ -44,7 +46,7 @@ void f(); // expected-warning{{missing exception specification}}
namespace rdar7853795 {
struct A {
bool getNumComponents() const; // expected-note{{declared here}}
- void dump() const {
+ void dump() const {
getNumComponenets(); // expected-error{{use of undeclared identifier 'getNumComponenets'; did you mean 'getNumComponents'?}}
}
};
OpenPOWER on IntegriCloud