diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-26 04:19:04 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-26 04:19:04 +0000 |
commit | c8af9107fd1eb014d9124b753c38c4d06fa219f4 (patch) | |
tree | 779e3232e8b43465c742dfc3036fc2d53cfd7e1a /include/clang/Rewrite/FixItRewriter.h | |
parent | f81263f04b0c211e1f2e2a08aca74256654c362b (diff) |
In FixItRewriteToTemp::RewriteFilename don't try to close the file descriptor
with close(); return it instead.
Fixes mingw build and eliminates possible racing issues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Rewrite/FixItRewriter.h')
-rw-r--r-- | include/clang/Rewrite/FixItRewriter.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/Rewrite/FixItRewriter.h b/include/clang/Rewrite/FixItRewriter.h index aeda25b24e..0ebd62c560 100644 --- a/include/clang/Rewrite/FixItRewriter.h +++ b/include/clang/Rewrite/FixItRewriter.h @@ -33,7 +33,12 @@ public: /// \brief This file is about to be rewritten. Return the name of the file /// that is okay to write to. - virtual std::string RewriteFilename(const std::string &Filename) = 0; + /// + /// \param fd out parameter for file descriptor. After the call it may be set + /// to an open file descriptor for the returned filename, or it will be -1 + /// otherwise. + /// + virtual std::string RewriteFilename(const std::string &Filename, int &fd) = 0; /// \brief Whether to abort fixing a file when not all errors could be fixed. bool FixWhatYouCan; |