[PATCH] D53639: [autocompletion] Handle the space before pressing tab
Raphael Isemann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 24 04:15:36 PDT 2018
teemperor requested changes to this revision.
teemperor added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/lib/Driver/Driver.cpp:1514
+ // which should end up in a file completion.
+ bool HasSpace = false;
+ if (PassedFlags.endswith(","))
----------------
Why not `const bool HasSpace = PassedFlags.endswith(",")`?
================
Comment at: clang/lib/Driver/Driver.cpp:1539
+ if (HasSpace && !Flags.empty()) {
+ llvm::outs() << '\n';
+ return;
----------------
Can you describe in the comment why printing a newline and returning here is the correct behavior? It's not obvious to the reader (including me).
https://reviews.llvm.org/D53639
More information about the cfe-commits
mailing list