History log of /llvm-project/clang/lib/Sema/SemaCodeComplete.cpp (Results 126 – 150 of 748)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# bbf386f0 23-Apr-2020 Puyan Lotfi <puyan@puyan.org>

Revert "[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec."

This reverts commit 2aa044ed088ae41461ad7029c055014df6c60976.

Reverting due to bot failure in lldb.


# 2aa044ed 22-Apr-2020 Puyan Lotfi <puyan@puyan.org>

[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

This is a code clean up of the PropertyAttributeKind and
ObjCPropertyAttributeKind enums in ObjCPropertyDecl and ObjCDe

[NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

This is a code clean up of the PropertyAttributeKind and
ObjCPropertyAttributeKind enums in ObjCPropertyDecl and ObjCDeclSpec that are
exactly identical. This non-functional change consolidates these enums
into one. The changes are to many files across clang (and comments in LLVM) so
that everything refers to the new consolidated enum in DeclObjCCommon.h.

Differential Revision: https://reviews.llvm.org/D77233

show more ...


Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1
# a76e68c9 29-Jan-2020 Sam McCall <sam.mccall@gmail.com>

[CodeComplete] Member completion for concept-constrained types.

Summary:
The basic idea is to walk through the concept definition, looking for
t.foo() where t has the constrained type.

In this patc

[CodeComplete] Member completion for concept-constrained types.

Summary:
The basic idea is to walk through the concept definition, looking for
t.foo() where t has the constrained type.

In this patch:
- nested types are recognized and offered after ::
- variable/function members are recognized and offered after the correct
dot/arrow/colon trigger
- member functions are recognized (anything directly called). parameter
types are presumed to be the argument types. parameters are unnamed.
- result types are available when a requirement has a type constraint.
These are printed as constraints, except same_as<T> which prints as T.

Not in this patch:
- support for merging/overloading when two locations describe the same member.
The last one wins, for any given name. This is probably important...
- support for nested template members (T::x<int>)
- support for completing members of (instantiations of) template template parameters

Reviewers: nridge, saar.raz

Subscribers: mgrang, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73649

show more ...


# f50fe5eb 18-Feb-2020 David Goldman <davg@google.com>

[Sema][CodeComplete] Handle symlinks for include code completion

Summary:
Previously any symlinks would be ignored since the directory
traversal doesn't follow them.

With this change we now follow

[Sema][CodeComplete] Handle symlinks for include code completion

Summary:
Previously any symlinks would be ignored since the directory
traversal doesn't follow them.

With this change we now follow symlinks (via a `stat` call
in order to figure out the target type of the symlink if it
is valid).

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74790

show more ...


# adcd0268 28-Jan-2020 Benjamin Kramer <benny.kra@googlemail.com>

Make llvm::StringRef to std::string conversions explicit.

This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly m

Make llvm::StringRef to std::string conversions explicit.

This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.

show more ...


# 42e9478e 23-Jan-2020 Kadir Cetinkaya <kadircet@google.com>

[clang][CodeComplete] Support for designated initializers

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73271


Revision tags: llvmorg-11-init
# 1f946ee2 13-Jan-2020 Kadir Cetinkaya <kadircet@google.com>

[clang][CodeComplete] Propogate printing policy to FunctionDecl

Summary:
Printing policy was not propogated to functiondecls when creating a
completion string which resulted in canonical template pa

[clang][CodeComplete] Propogate printing policy to FunctionDecl

Summary:
Printing policy was not propogated to functiondecls when creating a
completion string which resulted in canonical template parameters like
`foo<type-parameter-0-0>`. This patch propogates printing policy to those as
well.

Fixes https://github.com/clangd/clangd/issues/76

Reviewers: ilya-biryukov

Subscribers: jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72715

show more ...


# ff1e0fce 15-Jan-2020 Saar Raz <saar@raz.email>

[Concepts] Type Constraints

Add support for type-constraints in template type parameters.
Also add support for template type parameters as pack expansions (where the type constraint can now contain

[Concepts] Type Constraints

Add support for type-constraints in template type parameters.
Also add support for template type parameters as pack expansions (where the type constraint can now contain an unexpanded parameter pack).

Differential Revision: https://reviews.llvm.org/D44352

show more ...


# bf03944d 11-Jan-2020 Simon Pilgrim <llvm-dev@redking.me.uk>

Fix "pointer is null" static analyzer warnings. NFCI.

Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.


# 57a51b68 10-Jan-2020 Ilya Biryukov <ibiryukov@google.com>

[CodeComplete] Suggest 'return nullptr' in functions returning pointers

Reviewers: kadircet

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72497


# 3ec6128d 17-Dec-2019 Mark de Wever <koraq@xs4all.nl>

[Sema] Fixes -Wrange-loop-analysis warnings

This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.

Differential Revision: https://reviews.llvm.org/D71529


Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1
# 7f0dcf66 22-Nov-2019 Kirill Bobyrev <kbobyrev@google.com>

[clangd] Show lambda signature for lambda autocompletions

The original bug report can be found
[here](https://github.com/clangd/clangd/issues/85)

Given the following code:

```c++
void function() {

[clangd] Show lambda signature for lambda autocompletions

The original bug report can be found
[here](https://github.com/clangd/clangd/issues/85)

Given the following code:

```c++
void function() {
auto Lambda = [](int a, double &b) {return 1.f;};
La^
}
```

Triggering the completion at `^` would show `(lambda)` before this patch
and would show signature `(int a, double &b) const`, build a snippet etc
with this patch.

Reviewers: sammccall

Reviewed by: sammccall

Differential revision: https://reviews.llvm.org/D70445

show more ...


# 568db780 14-Nov-2019 Vedant Kumar <vsk@apple.com>

[CGDebugInfo] Emit subprograms for decls when AT_tail_call is understood (reland with fixes)

Currently, clang emits subprograms for declared functions when the
target debugger or DWARF standard is k

[CGDebugInfo] Emit subprograms for decls when AT_tail_call is understood (reland with fixes)

Currently, clang emits subprograms for declared functions when the
target debugger or DWARF standard is known to support entry values
(DW_OP_entry_value & the GNU equivalent).

Treat DW_AT_tail_call the same way to allow debuggers to follow cross-TU
tail calls.

Pre-patch debug session with a cross-TU tail call:

```
* frame #0: 0x0000000100000fa4 main`target at b.c:4:3 [opt]
frame #1: 0x0000000100000f99 main`main at a.c:8:10 [opt]
```

Post-patch (note that the tail-calling frame, "helper", is visible):

```
* frame #0: 0x0000000100000fa4 main`target at b.c:4:3 [opt]
frame #1: 0x0000000100000f80 main`helper [opt] [artificial]
frame #2: 0x0000000100000f99 main`main at a.c:8:10 [opt]
```

This was reverted in 5b9a072c because it attached declaration
subprograms to inlinable builtin calls, which interacted badly with the
MergeICmps pass. The fix is to not attach declarations to builtins.

rdar://46577651

Differential Revision: https://reviews.llvm.org/D69743

show more ...


# fa3b87fb 15-Nov-2019 Sam McCall <sam.mccall@gmail.com>

[CodeComplete] Constructor overload candidates report as vector(int) instead of vector<string>(int)

Summary:
This is shorter, shouldn't be confusing (is consistent with how they're declared),
and av

[CodeComplete] Constructor overload candidates report as vector(int) instead of vector<string>(int)

Summary:
This is shorter, shouldn't be confusing (is consistent with how they're declared),
and avoids messy cases that are printed as myclass<type-param-0-0>(int) in the
case of partial specialization.

Fixes part of https://github.com/clangd/clangd/issues/76

Reviewers: hokein, lh123

Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D70307

show more ...


# d9971d0b 28-Oct-2019 Ilya Biryukov <ibiryukov@google.com>

[clangd] Do not insert parentheses when completing a using declaration

Summary:
Would be nice to also fix this in clang, but that looks like more work
if we want to preserve signatures in informativ

[clangd] Do not insert parentheses when completing a using declaration

Summary:
Would be nice to also fix this in clang, but that looks like more work
if we want to preserve signatures in informative chunks.

Fixes https://github.com/clangd/clangd/issues/118

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69382

show more ...


# 8613e90b 04-Oct-2019 Ilya Biryukov <ibiryukov@google.com>

[CodeComplete] Ensure object is the same in compareOverloads()

Summary:
This fixes a regression that led to size() not being available in clangd
when completing 'deque().^' and using libc++.

Review

[CodeComplete] Ensure object is the same in compareOverloads()

Summary:
This fixes a regression that led to size() not being available in clangd
when completing 'deque().^' and using libc++.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68335

llvm-svn: 373710

show more ...


Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init
# 36082e39 18-Jul-2019 Sam McCall <sam.mccall@gmail.com>

[CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528

Summary:
The problem is the default LoadExternal with no completer, which happens when
loading global results.

[CodeComplete] Fix ASTUnit cached completion of macros from preamble, broken in r342528

Summary:
The problem is the default LoadExternal with no completer, which happens when
loading global results.

Reviewers: ilya-biryukov, nik

Subscribers: arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64864

llvm-svn: 366409

show more ...


# 49a3ad21 16-Jul-2019 Rui Ueyama <ruiu@google.com>

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone

Fix parameter name comments using clang-tidy. NFC.

This patch applies clang-tidy's bugprone-argument-comment tool
to LLVM, clang and lld source trees. Here is how I created this
patch:

$ git clone https://github.com/llvm/llvm-project.git
$ cd llvm-project
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Debug \
-DLLVM_ENABLE_PROJECTS='clang;lld;clang-tools-extra' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_LLD=On \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../llvm
$ ninja
$ parallel clang-tidy -checks='-*,bugprone-argument-comment' \
-config='{CheckOptions: [{key: StrictMode, value: 1}]}' -fix \
::: ../llvm/lib/**/*.{cpp,h} ../clang/lib/**/*.{cpp,h} ../lld/**/*.{cpp,h}

llvm-svn: 366177

show more ...


Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3
# 7fa2b74e 14-Jun-2019 Richard Smith <richard-llvm@metafoo.co.uk>

Use getOperatorSpelling to get the spelling of an overloaded operator
rather than duplicating operator name tables in multiple places.

llvm-svn: 363446


Revision tags: llvmorg-8.0.1-rc2
# 3dea5272 10-Jun-2019 Sam McCall <sam.mccall@gmail.com>

Re-land "[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods."

ShadowMapEntry is now really, truly a normal class.

llvm-svn: 362950


# 306e474b 10-Jun-2019 Sam McCall <sam.mccall@gmail.com>

Revert "[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods."

This reverts commit r362924, which causes a double-free of ShadowMapEntry.

llvm-svn: 362944


# 94600e46 10-Jun-2019 Sam McCall <sam.mccall@gmail.com>

Revert "Revert "[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods.""

This reverts commit r362830, and relands r362785 with the leak fixed.

llvm-svn: 362924


# a6283b06 07-Jun-2019 Vlad Tsyrklevich <vlad@tsyrklevich.net>

Revert "[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods."

This reverts commit f1f6e0fc2468e9c120b22b939507c527d08b8ee8, it was
causing LSan failures on the sanit

Revert "[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods."

This reverts commit f1f6e0fc2468e9c120b22b939507c527d08b8ee8, it was
causing LSan failures on the sanitizer bots:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/32809

llvm-svn: 362830

show more ...


# f1f6e0fc 07-Jun-2019 Sam McCall <sam.mccall@gmail.com>

[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods.

Summary:
- when a method is not available because of the target value kind (e.g. an &&
method on a Foo& variab

[CodeComplete] Improve overload handling for C++ qualified and ref-qualified methods.

Summary:
- when a method is not available because of the target value kind (e.g. an &&
method on a Foo& variable), then don't offer it.
- when a method is effectively shadowed by another method from the same class
with a) an identical argument list and b) superior qualifiers, then don't
offer it.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62582

llvm-svn: 362785

show more ...


# 30977fc3 04-Jun-2019 Ilya Biryukov <ibiryukov@google.com>

[CodeComplete] Include more text into typed chunks of pattern completions

Summary:
To allow filtering on any of the words in the editors.
In particular, the following completions were changed:
-

[CodeComplete] Include more text into typed chunks of pattern completions

Summary:
To allow filtering on any of the words in the editors.
In particular, the following completions were changed:
- 'using namespace <#name#>'
Typed text before: 'using', after: 'using namespace'.
- 'else if (#<condition#>)'
Before: 'else', after: 'else if'.
- 'using typename <#qualifier#>::<#name#>'
Before: 'using', after: 'using typename'.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62615

llvm-svn: 362479

show more ...


12345678910>>...30