[PATCH] D17820: Clang Code Completion Filtering

Bianca-Cristina Cristescu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 2 10:11:00 PST 2016


CrisCristescu created this revision.
CrisCristescu added reviewers: clang-c, benlangmuir, akyrtzi.
CrisCristescu added a subscriber: cfe-commits.
CrisCristescu set the repository for this revision to rL LLVM.
CrisCristescu changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".

The patch is enabling filtering for code completion.

The stem upon which the filtering is to be done is known at the moment of parsing.
A get/set function for the completion stem has been added to the Token class in order to save the stem as the identifier of the code_complete token type. Once the token has been set, it has to be passed through to the SemaCodeCompleteX functions, which subsequently passes it to the HandleCodeCompletionResults and which passes it to the PrintingCodeCompleteConsumer::ProcessCodeCompleteResults where the actual filtering is happening.


Repository:
  rL LLVM

http://reviews.llvm.org/D17820

Files:
  include/clang/Lex/Token.h
  include/clang/Sema/CodeCompleteConsumer.h
  include/clang/Sema/Sema.h
  lib/Lex/Lexer.cpp
  lib/Parse/ParseDecl.cpp
  lib/Parse/ParseDeclCXX.cpp
  lib/Parse/ParseExpr.cpp
  lib/Parse/ParseExprCXX.cpp
  lib/Parse/ParseObjc.cpp
  lib/Parse/ParseStmt.cpp
  lib/Parse/Parser.cpp
  lib/Sema/CodeCompleteConsumer.cpp
  lib/Sema/SemaCodeComplete.cpp
  test/CodeCompletion/Filtering/filter-function-name.cpp
  test/CodeCompletion/Filtering/filter-member-access.cpp
  test/CodeCompletion/Filtering/filter-namespace.cpp
  test/CodeCompletion/Filtering/filter-ordinary-name.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17820.49644.patch
Type: text/x-patch
Size: 87533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160302/e0b3a4fa/attachment-0001.bin>


More information about the cfe-commits mailing list