Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-24 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL264253: Added support for different VFSs in format::getStyle. (authored by ioeric). Changed prior to commit: http://reviews.llvm.org/D18399?vs=51440&id=51534#toc Repository: rL LLVM http://reviews.l

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg http://reviews.llvm.org/D18399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51440. ioeric added a comment. - changed c_str() to str() http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2148 @@ -2140,3 +2147,3 @@ // the file or not. -llvm::sys::fs::is_regular_file(Twine(ConfigFile), IsFile); - +Status = FS->status(ConfigFile.c_str()); +bool IsFile = Prefer .str to .c

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51431. ioeric marked 3 inline comments as done. ioeric added a comment. - some more redundancy removed http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/Fo

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 51426. ioeric added a comment. - removed redundant code. http://reviews.llvm.org/D18399 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

Re: [PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:2103 @@ +2102,3 @@ + if (!FS) { +// If FS is not specified, the default file system is the real file system. +FS = vfs::getRealFileSystem().get(); I think this comment is redundant. I'd remov

[PATCH] D18399: Added support for different VFSs in format::getStyle.

2016-03-23 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added reviewers: klimek, djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. Previously, format::getStyle assumes that the given file resides in the real file system, which prevents the use of virtual file system in testing etc.