krasimir added inline comments.

================
Comment at: clangd/GlobalCompilationDatabase.cpp:89
+  // if --compileCommands arg was invoked, check value and override default 
path
+  std::size_t found = CompileCommands.find_first_of("/");
+  std::string TempString = CompileCommands;
----------------
ilya-biryukov wrote:
> Please check command arguments for validity in `main()`. 
> What is the purpose of `find_first_of("/")`? Checking for absolute paths? If 
> yes, you could use `llvm::sys::path::is_absolute`.
Please make `CompileCommands` a member variable and pass it through the 
constructor of `DirectoryBasedGlobalCompilationDatabase`. This is more flexible 
and, among other things, allows for easier unit testing.


================
Comment at: clangd/GlobalCompilationDatabase.cpp:94
+     File = TempString;
+  }
+
----------------
LLVM style uses no braces for single statement `if`'s.


https://reviews.llvm.org/D37150



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

Reply via email to