JonasToth added inline comments.

================
Comment at: ClangTidy.cpp:614
+  vfs::FileSystem &FileSystem = *Files->getVirtualFileSystem();
+  auto InitialWorkingDir = FileSystem.getCurrentWorkingDirectory();
+  if (!InitialWorkingDir)
----------------
TheAhmad wrote:
> Eugene.Zelenko wrote:
> > Type is not obvious, so please don't use auto.
> Hi, Eugene. Why line 352 uses auto?
He means line 615 (`InitialWorkingDir`). The type of the variable can not be 
deduced from reading the code.

The rule is, to write the type once. E.g. `llvm::make_unique<MyType>(args)` 
makes it clear, that the type is `MyType`, so you can use `auto` for the 
variable.
This is not the case for `InitialWorkingDir`.


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