JonasToth added inline comments.

================
Comment at: ClangTidy.cpp:612
+
+  FileManager *Files = new FileManager(FileSystemOptions());
+  vfs::FileSystem &FileSystem = *Files->getVirtualFileSystem();
----------------
Eugene.Zelenko wrote:
> You could use auto here, because type is in new statement.
Where will the `delete` happen for the FileManager? I think a `unique_ptr` 
would be a good idea, not?

you can use `llvm::make_unique<>()` to reduce the verbosity of C++11.


================
Comment at: ClangTidy.cpp:624
+
+    SmallString<128> ErrorAbsoluteFilePath = (StringRef)Error.Message.FilePath;
+    Files->makeAbsolutePath(ErrorAbsoluteFilePath);
----------------
Please use a named cast for your intended purpose.


================
Comment at: ClangTidy.cpp:630
+      AbsoluteError.Fix.clear();
+      SingleErrors.insert(std::pair<StringRef, ClangTidyError>(
+          ErrorAbsoluteFilePath, AbsoluteError));
----------------
You could maybe use `std::make_pair` here.


================
Comment at: ClangTidy.cpp:657
+
+    AbsoluteError.Fix.insert(std::pair<StringRef, Replacements>(File, Repls));
+
----------------
`make_pair` too.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49890



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to