[PATCH] D69382: [clangd] Do not insert parentheses when completing a using declaration

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 09:58:04 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:463
+  // Check all-scopes completions too.
+  Opts.AllScopes = true;
+  Results = completions(R"cpp(
----------------
I believe `AllScopes` and this feature is orthogonal what exactly is this part of the test checking for?


================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:5376
 
-  ResultBuilder Results(
-      *this, CodeCompleter->getAllocator(),
-      CodeCompleter->getCodeCompletionTUInfo(),
-      CodeCompletionContext(CodeCompletionContext::CCC_Symbol, PreferredType));
+  CodeCompletionContext CC(CodeCompletionContext::CCC_Symbol, PreferredType);
+  CC.setCXXScopeSpecifier(SS);
----------------
`CC` in here and above(in the `SS.isInvalid` case) seems to be the same, why not use only a single one?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69382/new/

https://reviews.llvm.org/D69382





More information about the cfe-commits mailing list