[PATCH] D34947: [clangd] Add support for per-file extra flags

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 4 02:12:36 PDT 2017


krasimir added inline comments.


================
Comment at: clangd/GlobalCompilationDatabase.cpp:20
+                          const SmallVectorImpl<StringRef> &ExtraFlags) {
+  assert(Command && !Command->CommandLine.empty());
+  if (!Command || ExtraFlags.empty())
----------------
ilya-biryukov wrote:
> Maybe pass `Command` by reference to avoid checking for null?
> Is there a guideline to use pointers to make things more explicit that I've missed?
There's a guideline to use pointers for google style, but I'm not aware for such for llvm style.


https://reviews.llvm.org/D34947





More information about the cfe-commits mailing list