Committed in r247160, thanks! > On Sep 3, 2015, at 10:16 PM, Cameron Esfahani <di...@apple.com> wrote: > > dirty created this revision. > dirty added a reviewer: akyrtzi. > dirty added a subscriber: cfe-commits. > > Fix a small bug in clang where generating some temporary files would > have an extra period before the extension. > > http://reviews.llvm.org/D12627 > > Files: > lib/ARCMigrate/FileRemapper.cpp > lib/ARCMigrate/ObjCMT.cpp > lib/Frontend/Rewrite/FrontendActions.cpp > > Index: lib/Frontend/Rewrite/FrontendActions.cpp > =================================================================== > --- lib/Frontend/Rewrite/FrontendActions.cpp > +++ lib/Frontend/Rewrite/FrontendActions.cpp > @@ -78,7 +78,7 @@ > std::string RewriteFilename(const std::string &Filename, int &fd) override { > SmallString<128> Path; > llvm::sys::fs::createTemporaryFile(llvm::sys::path::filename(Filename), > - llvm::sys::path::extension(Filename), > fd, > + > llvm::sys::path::extension(Filename).drop_front(), fd, > Path); > return Path.str(); > } > Index: lib/ARCMigrate/ObjCMT.cpp > =================================================================== > --- lib/ARCMigrate/ObjCMT.cpp > +++ lib/ARCMigrate/ObjCMT.cpp > @@ -2218,7 +2218,7 @@ > SmallString<64> TempPath; > int FD; > if (fs::createTemporaryFile(path::filename(FE->getName()), > - path::extension(FE->getName()), FD, > + path::extension(FE->getName()).drop_front(), > FD, > TempPath)) { > reportDiag("Could not create file: " + TempPath.str(), Diag); > return std::string(); > Index: lib/ARCMigrate/FileRemapper.cpp > =================================================================== > --- lib/ARCMigrate/FileRemapper.cpp > +++ lib/ARCMigrate/FileRemapper.cpp > @@ -144,7 +144,7 @@ > SmallString<64> tempPath; > int fd; > if (fs::createTemporaryFile(path::filename(origFE->getName()), > - path::extension(origFE->getName()), fd, > + > path::extension(origFE->getName()).drop_front(), fd, > tempPath)) > return report("Could not create file: " + tempPath.str(), Diag); > > > > <D12627.34013.patch>
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits