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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 19 03:24:37 PST 2018


ilya-biryukov 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);
+
----------------
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?


Repository:
  rC Clang

https://reviews.llvm.org/D43379





More information about the cfe-commits mailing list