[PATCH] D40563: [SemaCodeComplete] Allow passing out scope specifiers in qualified-id completions via completion context.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 06:31:42 PST 2017


ioeric added inline comments.


================
Comment at: lib/Sema/SemaCodeComplete.cpp:4609
 
+  if (SS.isInvalid()) {
+    CodeCompletionContext CC(CodeCompletionContext::CCC_Name);
----------------
ilya-biryukov wrote:
> ilya-biryukov wrote:
> > Why do we alter this code path?
> Maybe we should add a test or provide examples why the current code does not work for us?
There is no existing unit test for CodeCompletion, and there is no much to test here either. I added a comment with example for this.


================
Comment at: lib/Sema/SemaCodeComplete.cpp:4611
+    CodeCompletionContext CC(CodeCompletionContext::CCC_Name);
+    CC.setCXXScopeSpecifier(SS);
+    HandleCodeCompleteResults(this, CodeCompleter, CC, nullptr, 0);
----------------
ilya-biryukov wrote:
> Do we really want to set invalid scope specifiers here?
Yes, see the comment I added.


https://reviews.llvm.org/D40563





More information about the cfe-commits mailing list