kadircet added inline comments.

================
Comment at: clangd/Protocol.h:368
+  /// both Optionals are instantiated.
+  llvm::Optional<llvm::Optional<std::string>> compilationDatabasePath;
 
----------------
ilya-biryukov wrote:
> Not a big fan or something like this, but maybe give special meaning to empty 
> path instead of wrapping an optional into an optional?
> 
> Double optionals are a real pain to write and read.
Sorry just passing by since I've seen a similar usage that already exists in 
codebase, wanted to point it out.

Some api like this could be easier, to make the decision of using empty path or 
anything else for an invalid path and making it an implementation detail.

https://github.com/llvm-mirror/clang/blob/master/include/clang/Sema/DeclSpec.h#L53


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51725



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

Reply via email to