This revision was automatically updated to reflect the committed changes.
Closed by commit rL342449: [CodeComplete] Add completions for filenames in
#include directives. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llv
This revision was automatically updated to reflect the committed changes.
Closed by commit rC342449: [CodeComplete] Add completions for filenames in
#include directives. (authored by sammccall, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D52076?vs=165787&id=165904#toc
Rep
sammccall added inline comments.
Comment at: lib/Sema/SemaCodeComplete.cpp:8057
+ if (!(Filename.endswith(".h") || Filename.endswith(".hh") ||
+Filename.endswith(".H") || Filename.endswith(".hpp") ||
+Filename.endswith(".inc")))
--
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: lib/Sema/SemaCodeComplete.cpp:8057
+ if (!(Filename.endswith(".h") || Filename.endswith(".hh") ||
+Filename.endswith("
sammccall updated this revision to Diff 165787.
sammccall marked an inline comment as done.
sammccall added a comment.
Handle completion after a backslash in MSVC-compat mode.
Repository:
rC Clang
https://reviews.llvm.org/D52076
Files:
include/clang-c/Index.h
include/clang/Lex/CodeComple
ilya-biryukov added inline comments.
Comment at: lib/Lex/Lexer.cpp:2086
+ StringRef PartialPath(PathStart, CompletionPoint - PathStart);
+ auto Slash = PartialPath.rfind('/');
+ StringRef Dir =
This will probably break for backslash includes.
We should probabl
sammccall added a comment.
After experimenting, editor support for replacing non-identifier text before
the cursor is... spotty at best.
So switched to just replacing the last path component.
(This makes me a bit sad because the completions now have closing quotes but
not opening ones, which lo
sammccall updated this revision to Diff 165759.
sammccall added a comment.
Address comments.
Only complete last segment for better compatibility.
Repository:
rC Clang
https://reviews.llvm.org/D52076
Files:
include/clang-c/Index.h
include/clang/Lex/CodeCompletionHandler.h
include/clang/
ilya-biryukov added a comment.
Sorry for the late response.
Please see the comments about adding closing quotes and slashes. It does not
seem to work in the clients that auto-add closing quotes or when completing
inside existing includes.
Comment at: lib/Lex/Lexer.cpp:1931
+
sammccall added a comment.
Addressed the comments I was sure about.
A couple of open questions in SemaCodeComplete about the formatting of the
completions, but want to know what you think.
Comment at: lib/Sema/SemaCodeComplete.cpp:8046
+ !EC && It != vfs::directory_ite
sammccall updated this revision to Diff 165593.
sammccall marked 9 inline comments as done.
sammccall added a comment.
Unify common completion code from angled/quoted strings in Lexer.
Handle #include paths with \ on windows (normalize them to /)
Document why we picked particular extensions for he
sammccall added a comment.
Thanks a lot, great comments!
I haven't made changes yet (I will) but there's a few questions to work out
first...
Comment at: lib/Lex/Lexer.cpp:1931
+ StringRef PartialPath(AfterQuote, CurPtr - 1 - AfterQuote);
+ auto Slash = Parti
ilya-biryukov added a comment.
Amazing, can't wait for it to land!
Comment at: lib/Lex/Lexer.cpp:1931
+ StringRef PartialPath(AfterQuote, CurPtr - 1 - AfterQuote);
+ auto Slash = PartialPath.rfind('/');
+ StringRef Dir =
It's also val
sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added a subscriber: cfe-commits.
The dir component ("somedir" in #include ) is considered fixed.
We append "foo" to each directory on the include path, and then list its files.
Completions are of the forms:
^-te
14 matches
Mail list logo