[PATCH] D48973: [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 5 08:04:38 PDT 2018
sammccall added a comment.
Could you give a little more context about how this will be used? (where the completion items come from, and when the strings will get built)
================
Comment at: include/clang/Sema/CodeCompleteConsumer.h:921
bool IncludeBriefComments);
+ CodeCompletionString *
+ CreateCodeCompletionStringForMacro(Preprocessor &PP,
----------------
please document the new function - particularly why it's different and what's the use case it supports
(if I understand right, it's to allow storing CodeCompletionResult instances for later stringification only when they're for macros - why?)
One of the args you're *not* taking here is ASTContext, but if I understand right it must still be alive: `this->Macro` points into the IdentifierTable which is owned by ASTContext.
In some sense taking this arg seems like a safety feature!
Repository:
rC Clang
https://reviews.llvm.org/D48973
More information about the cfe-commits
mailing list