Commit Graph

17 Commits

Author SHA1 Message Date
Tony Allevato
300a952ede Replace u8 string literal prefixes with SWIFT_UTF8 macro.
In C++20, `u8` literals create values of type `char8_t` instead of
`char`, and these can't be implicitly converted. This macro
mitigates the difference and allows the same code to compile under
C++14/17 modes and C++20, preserving the `char` type while ensuring
that the text is interpreted as UTF-8.
2023-08-04 16:41:36 -04:00
Rintaro Ishizaki
75ff9480c2 [CodeCompletion] Boost exact case-sensitive prefix match
When there are symbols 'Label' and 'label', if a user type 'Lab',
'Label' should be prioritized.

rdar://77164709
2021-04-27 22:32:37 -07:00
Ben Langmuir
c5b42aca11 Move FuzzyStringMatcherTest to IDE unittests 2020-08-25 13:00:35 -07:00
Michael Forster
32d2b1486c Fix build breaks for master-next against llvm.org.
StringRef conversion to std::string needs to be explicit now.
2020-03-13 19:08:22 +01:00
Bob Wilson
390058972a [master-next] Use PRIVATE in target_link_libraries for executables
This is needed to work with LLVM r319840.
2017-12-06 21:55:22 -08:00
Argyrios Kyrtzidis
0c54a120a0 [IDE] Introduce ide::replacePlaceholders() which replaces Xcode editor placeholders with dollar identifiers
and returns a new memory buffer.

Swift SVN r25897
2015-03-09 23:02:56 +00:00
Jordan Rose
f2b3a3ae3b [CMake] Remove unnecessary dependencies from gtest targets.
No functionality change.

Swift SVN r24256
2015-01-08 03:02:11 +00:00
Dmitri Hrybenko
269de5fa7f CMake: allow mixed configurations of LLVM and Swift with Xcode
Swift SVN r24177
2015-01-05 07:18:13 +00:00
Ted Kremenek
028f9d0561 Remove rest of Makefile build except for 'docs' and 'www'.
For 'docs' and 'www' it is possible these are still being used,
as they work independent of the Makefile build.  Keeping them for now.

Swift SVN r14418
2014-02-26 22:21:25 +00:00
Dmitri Hrybenko
5a88513e71 Don't link to curses library explicitly
LLVM build system has been fixed to pass down this linker flag automatically.


Swift SVN r7048
2013-08-08 17:46:52 +00:00
Adrian Prantl
1a0875bc3f Add curses library to the unit tests.
Swift SVN r6996
2013-08-07 20:24:22 +00:00
Argyrios Kyrtzidis
7e81b4919a [IDE] Rename "code_completion" namespace to "ide"
Swift SVN r6834
2013-08-02 02:50:28 +00:00
Dmitri Hrybenko
f9fa6aa8fc Code completion: insert a zero character into the buffer to mark the code
completion token

This is required to handle cases like fooObject.#^A^#.bar where code completion
is invoked inside the ".." token.  Previously, the token would not be split and
the lexer would produce an incorrect tokenization for this case.  Now we
produce ".", tok::code_complete, ".".


Swift SVN r6635
2013-07-26 00:45:57 +00:00
Dmitri Hrybenko
96b0f31ae7 removeCodeCompletionTokens(): return a 0-based offset of the code completion token
Documentation comment says that it should return a 0-based offset, but it
actually returns a 1-based offest.

Code completion tests did not catch this bug because the only consequence is
that the code completion token is shifted one character to the right, and in
all code completion tests we had a space after the code completion token.


Swift SVN r6566
2013-07-24 22:30:24 +00:00
Dmitri Hrybenko
e650f2f8fc Implement basic code completion at the beginning of the expr-postfix
We produce only names that are found by name lookup, no keywords or types yet.


Swift SVN r6276
2013-07-16 00:49:08 +00:00
Dmitri Hrybenko
a6965926b4 Unbreak autoconf build
Swift SVN r6258
2013-07-15 17:22:52 +00:00
Dmitri Hrybenko
3c5b12fc0f Code completion: add a lot of infrastructure code
* Added a mode in swift-ide-test to test code completion.  Unlike c-index-test,
  the code completion token in tests is a real token -- we don't need to
  count lines and columns anymore.

* Added support in lexer to produce a code completion token.

* Added a parser interface to code completion.  It is passed down from the
  libFrontend to the parser, but its functions are not called yet.

* Added a sketch of the interface of code completion consumer and code
  completion results.

Note: all this is not doing anything useful yet.


Swift SVN r6128
2013-07-10 20:53:40 +00:00