[PATCH] D43379: [CodeComplete] Add a helper to print CodeCompletionContext::Kind

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 19 03:31:27 PST 2018


sammccall added inline comments.


================
Comment at: include/clang/Sema/CodeCompleteConsumer.h:355
+/// \brief Get string representation of \p Kind, useful for for debugging.
+llvm::StringRef printCompletionKind(enum CodeCompletionContext::Kind Kind);
+
----------------
ilya-biryukov wrote:
> sammccall wrote:
> > nit: this doesn't print anything, maybe completionKindString?
> This breaks LLVM [[ https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly | style guide ]]. 
> > Function names should be verb phrases.
> And we every other function in this file seems to stick to these rules, I'd rather be consistent with the rest of the code.
> 
> I'm leaning towards calling it `getCompletionKindAsString()`. It's not a short name, but doesn't have the confusing `print` prefix. WDYT?
print or get is fine (you could drop the as).

Not sure how I feel about this rule :-)


Repository:
  rC Clang

https://reviews.llvm.org/D43379





More information about the cfe-commits mailing list