summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FixItRewriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-02 03:14:12 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-02 03:14:12 +0000
commit862ffb11d513d2037d928eb1becefa7acbe136d1 (patch)
tree38aa17a4a5fe8d0372deb4a2f3829f9c9db30850 /clang/lib/Frontend/FixItRewriter.cpp
parent720683752e0de8970171dc4ef7762af4295120bb (diff)
downloadbcm5719-llvm-862ffb11d513d2037d928eb1becefa7acbe136d1.tar.gz
bcm5719-llvm-862ffb11d513d2037d928eb1becefa7acbe136d1.zip
Clean up -fixit output slightly
llvm-svn: 68278
Diffstat (limited to 'clang/lib/Frontend/FixItRewriter.cpp')
-rw-r--r--clang/lib/Frontend/FixItRewriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FixItRewriter.cpp b/clang/lib/Frontend/FixItRewriter.cpp
index a53d1e56d14..33ab0b7c99b 100644
--- a/clang/lib/Frontend/FixItRewriter.cpp
+++ b/clang/lib/Frontend/FixItRewriter.cpp
@@ -57,8 +57,9 @@ bool FixItRewriter::WriteFixedFile(const std::string &InFileName,
OutFile = &llvm::outs();
} else {
llvm::sys::Path Path(InFileName);
+ std::string Suffix = Path.getSuffix();
Path.eraseSuffix();
- Path.appendSuffix("cpp");
+ Path.appendSuffix("fixit." + Suffix);
std::string Err;
OutFile = new llvm::raw_fd_ostream(Path.toString().c_str(),
// set binary mode (critical for Windoze)
OpenPOWER on IntegriCloud