[PATCH] D82535: [CodeComplete] Add code completion for using alias.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 25 04:49:00 PDT 2020
kadircet added a comment.
mostly LG, apart from the comments around the fallthrough, thanks!
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:2061
+ if (SemaRef.getLangOpts().CPlusPlus11)
+ AddUsingAliasResult(Results);
----------------
there's already a fallthrough down below, please drop this one.
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:2091
if (CCC == Sema::PCC_Class) {
+ if (SemaRef.getLangOpts().CPlusPlus11)
----------------
let's put this right after using declaration. (this at least needs to be outside this if statement to be triggered by fallthrough)
================
Comment at: clang/lib/Sema/SemaCodeComplete.cpp:1820
+// using name = type
+static void AddUsingAliasResult(ResultBuilder &Results) {
+ CodeCompletionBuilder Builder(Results.getAllocator(),
----------------
let's take in the `CodeCompletionBuilder&` too instead of creating a new one.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82535/new/
https://reviews.llvm.org/D82535
More information about the cfe-commits
mailing list