This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Add a helper to print CodeCompletionContext::Kind
ClosedPublic

Authored by ilya-biryukov on Feb 16 2018, 3:25 AM.

Diff Detail

Repository
rC Clang

Event Timeline

ilya-biryukov created this revision.Feb 16 2018, 3:25 AM
sammccall accepted this revision.Feb 19 2018, 1:40 AM
sammccall added inline comments.
include/clang/Sema/CodeCompleteConsumer.h
355

nit: this doesn't print anything, maybe completionKindString?

This revision is now accepted and ready to land.Feb 19 2018, 1:40 AM
ilya-biryukov added inline comments.Feb 19 2018, 3:24 AM
include/clang/Sema/CodeCompleteConsumer.h
355

This breaks LLVM 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?

sammccall added inline comments.Feb 19 2018, 3:30 AM
include/clang/Sema/CodeCompleteConsumer.h
355

print or get is fine (you could drop the as).

Not sure how I feel about this rule :-)

  • Rename printCompletionKind to getCompletionKindString
ilya-biryukov marked 3 inline comments as done.Feb 19 2018, 4:17 AM
This revision was automatically updated to reflect the committed changes.