[PATCH] D47274: [clangd] Serve comments for headers decls from dynamic index only

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 24 07:47:50 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/CodeCompletionStrings.h:46
                        const CodeCompleteConsumer::OverloadCandidate &Result,
-                       unsigned ArgIndex);
+                       unsigned ArgIndex, bool NoCommentsFromHeaders = true);
 
----------------
sammccall wrote:
> this invites double negation.
> Also it doesn't seem like a great default, violates principle of least surprise.
> 
> prefer bool CommentsFromHeaders = true, or with no default.
> (or even consider an enum)
Thanks for spotting this!
I opted for a positive bool flag with no defaults.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47274





More information about the cfe-commits mailing list