History log of /llvm-project/clang/lib/Sema/SemaCodeComplete.cpp (Results 26 – 50 of 748)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cc4ecfd6 09-Dec-2023 Kazu Hirata <kazu@google.com>

[ADT] Rename SmallString::{starts,ends}with to {starts,ends}_with (#74916)

This patch renames {starts,ends}with to {starts,ends}_with for
consistency with std::{string,string_view}::{starts,ends}_w

[ADT] Rename SmallString::{starts,ends}with to {starts,ends}_with (#74916)

This patch renames {starts,ends}with to {starts,ends}_with for
consistency with std::{string,string_view}::{starts,ends}_with in
C++20. Since there are only a handful of occurrences, this patch
skips the deprecation phase and simply renames them.

show more ...


Revision tags: llvmorg-17.0.6
# 7091ca1a 24-Nov-2023 Sebastian Poeplau <poeplau@adacore.com>

[clang] Add missing LinkageSpec case to getCursorKindForDecl (#72401)

The LinkageSpec case was omitted, and there is a declared CXCursor_Kind
for it. Adapt the testsuite drivers to print mangled na

[clang] Add missing LinkageSpec case to getCursorKindForDecl (#72401)

The LinkageSpec case was omitted, and there is a declared CXCursor_Kind
for it. Adapt the testsuite drivers to print mangled names for
declarations with extern linkage. Also update the test baseline for the
recursive-cxx-member-calls.cpp test.

Co-authored-by: Matthieu Eyraud <eyraud@adacore.com>

show more ...


Revision tags: llvmorg-17.0.5
# edd690b0 03-Nov-2023 Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>

[clang][NFC] Refactor `TagTypeKind` (#71160)

This patch converts TagTypeKind into scoped enum. Among other benefits,
this allows us to forward-declare it where necessary.


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# 23ef8bf9 06-Aug-2023 Younan Zhang <zyn7109@gmail.com>

[clangd][CodeComplete] Improve FunctionCanBeCall

From two aspects:

- For function templates, emit additional template argument
placeholders in the context where it can't be a call in order
to speci

[clangd][CodeComplete] Improve FunctionCanBeCall

From two aspects:

- For function templates, emit additional template argument
placeholders in the context where it can't be a call in order
to specify an instantiation explicitly.

- Consider expressions with base type specifier such as
'Derived().Base::foo^' a function call.

Reviewed By: nridge

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

show more ...


# 79af92bb 28-Aug-2023 Fred Fu <moonsolo@gmail.com>

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a li

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method.
The first component serves as the main entry point of handling interactive inputs.

Because a completion point for a compiler instance has to be unchanged once it
is set, an incremental compiler instance is created for each code
completion. Such a compiler instance carries over AST context source from the
main interpreter compiler in order to obtain declarations or bindings from
previous input in the same REPL session.

The most important API codeComplete in Interpreter/CodeCompletion is a thin
wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as
a code completion point and a ReplCompletionConsumer, which communicates
completion results from SemaCodeCompletion back to the list completer for the
REPL.

In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels
were added so that SemaCodeCompletion can treat top level statements like
expression statements at the REPL. For example,

clang-repl> int foo = 42;
clang-repl> f<tab>

From a parser's persective, the cursor is at a top level. If we used code
completion without any changes, PCC_Namespace would be supplied to
Sema::CodeCompleteOrdinaryName, and thus the completion results would not
include foo.

Currently, the way we use PCC_TopLevelOrExpression and
CCC_TopLevelOrExpression is no different from the way we use PCC_Statement
and CCC_Statement respectively.

Differential revision: https://reviews.llvm.org/D154382
"

The new patch also fixes clangd and several memory issues that the bots reported
and upload the missing files.

show more ...


# 752f87cd 28-Aug-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Revert "Reland "[clang-repl] support code completion at a REPL.""

This reverts commit 5ab25a42ba70c4b50214b0e78eaaccd30696fa09 due to forgotten
files.


# 5ab25a42 28-Aug-2023 Fred Fu <moonsolo@gmail.com>

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a li

Reland "[clang-repl] support code completion at a REPL."

Original commit message:
"
This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method.
The first component serves as the main entry point of handling interactive inputs.

Because a completion point for a compiler instance has to be unchanged once it
is set, an incremental compiler instance is created for each code
completion. Such a compiler instance carries over AST context source from the
main interpreter compiler in order to obtain declarations or bindings from
previous input in the same REPL session.

The most important API codeComplete in Interpreter/CodeCompletion is a thin
wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as
a code completion point and a ReplCompletionConsumer, which communicates
completion results from SemaCodeCompletion back to the list completer for the
REPL.

In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels
were added so that SemaCodeCompletion can treat top level statements like
expression statements at the REPL. For example,

clang-repl> int foo = 42;
clang-repl> f<tab>

From a parser's persective, the cursor is at a top level. If we used code
completion without any changes, PCC_Namespace would be supplied to
Sema::CodeCompleteOrdinaryName, and thus the completion results would not
include foo.

Currently, the way we use PCC_TopLevelOrExpression and
CCC_TopLevelOrExpression is no different from the way we use PCC_Statement
and CCC_Statement respectively.

Differential revision: https://reviews.llvm.org/D154382
"

The new patch also fixes clangd and several memory issues that the bots reported.

show more ...


# f94a937c 23-Aug-2023 Vassil Vassilev <v.g.vassilev@gmail.com>

Revert "[clang-repl] support code completion at a REPL."

This reverts commit eb0e6c3134ef6deafe0a4958e9e1a1214b3c2f14 due to failures in
clangd such as https://lab.llvm.org/buildbot/#/builders/57/bu

Revert "[clang-repl] support code completion at a REPL."

This reverts commit eb0e6c3134ef6deafe0a4958e9e1a1214b3c2f14 due to failures in
clangd such as https://lab.llvm.org/buildbot/#/builders/57/builds/29377

show more ...


# eb0e6c31 22-Aug-2023 Fred Fu <moonsolo@gmail.com>

[clang-repl] support code completion at a REPL.

This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
Compl

[clang-repl] support code completion at a REPL.

This patch enabled code completion for ClangREPL. The feature was built upon
three existing Clang components: a list completer for LineEditor, a
CompletionConsumer from SemaCodeCompletion, and the ASTUnit::codeComplete method.
The first component serves as the main entry point of handling interactive inputs.

Because a completion point for a compiler instance has to be unchanged once it
is set, an incremental compiler instance is created for each code
completion. Such a compiler instance carries over AST context source from the
main interpreter compiler in order to obtain declarations or bindings from
previous input in the same REPL session.

The most important API codeComplete in Interpreter/CodeCompletion is a thin
wrapper that calls with ASTUnit::codeComplete with necessary arguments, such as
a code completion point and a ReplCompletionConsumer, which communicates
completion results from SemaCodeCompletion back to the list completer for the
REPL.

In addition, PCC_TopLevelOrExpression and CCC_TopLevelOrExpression` top levels
were added so that SemaCodeCompletion can treat top level statements like
expression statements at the REPL. For example,

clang-repl> int foo = 42;
clang-repl> f<tab>

From a parser's persective, the cursor is at a top level. If we used code
completion without any changes, PCC_Namespace would be supplied to
Sema::CodeCompleteOrdinaryName, and thus the completion results would not
include foo.

Currently, the way we use PCC_TopLevelOrExpression and
CCC_TopLevelOrExpression is no different from the way we use PCC_Statement
and CCC_Statement respectively.

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

show more ...


# 9b987e08 21-Aug-2023 Kazu Hirata <kazu@google.com>

[Sema] Modernize ShadowMapEntry (NFC)


# d9cb76bc 15-Aug-2023 Nathan Ridge <zeratul976@hotmail.com>

[clang] Support function pointer types with attributes when extracting parameter names for signature help

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

Differential Revision: https://reviews.l

[clang] Support function pointer types with attributes when extracting parameter names for signature help

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

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

show more ...


# 0ce056a8 11-Aug-2023 Aaron Ballman <aaron@aaronballman.com>

[C23] Rename C2x -> C23; NFC

This does the rename for most internal uses of C2x, but does not rename
or reword diagnostics (those will be done in a follow-up).

I also updated standards references a

[C23] Rename C2x -> C23; NFC

This does the rename for most internal uses of C2x, but does not rename
or reword diagnostics (those will be done in a follow-up).

I also updated standards references and citations to the final wording
in the standard.

show more ...


Revision tags: llvmorg-17.0.0-rc1
# 235390d9 25-Jul-2023 Sindhu Chittireddy <sindhu.chittireddy@intel.com>

[NFC] Avoid potential dereferencing of nullptr.

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


Revision tags: llvmorg-18-init
# a42ce094 27-Jun-2023 David Goldman <davg@google.com>

[clang][Sema] Add CodeCompletionContext::CCC_ObjCClassForwardDecl

- Use this new context in Sema to limit completions to seen ObjC class
names

- Use this new context in clangd to disable include

[clang][Sema] Add CodeCompletionContext::CCC_ObjCClassForwardDecl

- Use this new context in Sema to limit completions to seen ObjC class
names

- Use this new context in clangd to disable include insertions when
completing ObjC forward decls

Reviewed By: kadircet

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

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5
# b1e5b28b 25-May-2023 Jan Svoboda <jan_svoboda@apple.com>

[clang][lex] NFCI: Use FileEntryRef in Sema::CodeCompleteIncludedFile

This patch replaces some calls to the deprecated `DirectoryEntry::getName()` with calls to `DirectoryEntryRef::getName()` in Sem

[clang][lex] NFCI: Use FileEntryRef in Sema::CodeCompleteIncludedFile

This patch replaces some calls to the deprecated `DirectoryEntry::getName()` with calls to `DirectoryEntryRef::getName()` in SemaCodeComplete.cpp.

Depends on D127654.

Reviewed By: bnbarham

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

show more ...


Revision tags: llvmorg-16.0.4
# ed1539c6 16-May-2023 Kazu Hirata <kazu@google.com>

Migrate {starts,ends}with_insensitive to {starts,ends}_with_insensitive (NFC)

This patch migrates uses of StringRef::{starts,ends}with_insensitive
to StringRef::{starts,ends}_with_insensitive so tha

Migrate {starts,ends}with_insensitive to {starts,ends}_with_insensitive (NFC)

This patch migrates uses of StringRef::{starts,ends}with_insensitive
to StringRef::{starts,ends}_with_insensitive so that we can use names
similar to those used in std::string_view.

Note that the llvm/ directory has migrated in commit
6c3ea866e93003e16fc55d3b5cedd3bc371d1fde.

I'll post a separate patch to deprecate
StringRef::{starts,ends}with_insensitive.

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

show more ...


Revision tags: llvmorg-16.0.3, llvmorg-16.0.2
# 40136ece 18-Apr-2023 Stoorx <me@stoorx.one>

[clang] Make access to submodules via `iterator_range`

In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding itera

[clang] Make access to submodules via `iterator_range`

In file `clang/lib/Basic/Module.cpp` the `Module` class had `submodule_begin()` and `submodule_end()` functions to retrieve corresponding iterators for private vector of Modules. This commit removes mentioned functions, and replaces all of theirs usages with `submodules()` function and range-based for-loops.

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

show more ...


# b51a03e1 17-Apr-2023 Bill Wendling <morbo@google.com>

[Clang][NFC] Rename methods/vars to reflect their real usage

The "getField" method is a bit confusing considering we also have a
"getFieldName" method. Instead, use "getFieldDecl" rather than
"getFi

[Clang][NFC] Rename methods/vars to reflect their real usage

The "getField" method is a bit confusing considering we also have a
"getFieldName" method. Instead, use "getFieldDecl" rather than
"getField".

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

show more ...


# 33cf2a39 07-Apr-2023 Manna, Soumi <soumi.manna@intel.com>

[NFC][clang] Fix static analyzer tool remarks about large copies by values

Reported by Coverity:

Big parameter passed by value
Copying large values is inefficient, consider

[NFC][clang] Fix static analyzer tool remarks about large copies by values

Reported by Coverity:

Big parameter passed by value
Copying large values is inefficient, consider passing by reference; Low, medium, and high size thresholds for detection can be adjusted.

1. Inside "SemaConcept.cpp" file, in subsumes<clang::Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic(clang::NamedDecl *, llvm::ArrayRef<clang::Expr const *>, clang::NamedDecl *, llvm::ArrayRef<clang::Expr const *>)::[lambda(clang::AtomicConstraint const &, clang::AtomicConstraint const &) (instance 2)]>(llvm::SmallVector<llvm::SmallVector<clang::AtomicConstraint *, 2u>, 4u>, llvm::SmallVector<llvm::SmallVector<clang::AtomicConstraint *, 2u>, 4u>, T1): A large function call parameter exceeding the low threshold is passed by value.

i. pass_by_value: Passing parameter PDNF of type NormalForm (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.

ii. pass_by_value: Passing parameter QCNF of type NormalForm (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.

2. Inside "CodeGenAction.cpp" file, in clang::reportOptRecordError(llvm::Error, clang::DiagnosticsEngine &, clang::CodeGenOptions): A very large function call parameter exceeding the high threshold is passed by value.

i. pass_by_value: Passing parameter CodeGenOpts of type clang::CodeGenOptions const (size 1560 bytes) by value, which exceeds the high threshold of 512 bytes.

3. Inside "SemaCodeComplete.cpp" file, in HandleCodeCompleteResults(clang::Sema *, clang::CodeCompleteConsumer *, clang::CodeCompletionContext, clang::CodeCompletionResult *, unsigned int): A large function call parameter exceeding the low threshold is passed by value.

i. pass_by_value: Passing parameter Context of type clang::CodeCompletionContext (size 200 bytes) by value, which exceeds the low threshold of 128 bytes.

4. Inside "SemaConcept.cpp" file, in <unnamed>::SatisfactionStackRAII::SatisfactionStackRAII(clang::Sema &, clang::NamedDecl const *, llvm::FoldingSetNodeID): A large function call parameter exceeding the low threshold is passed by value.

i. pass_by_value: Passing parameter FSNID of type llvm::FoldingSetNodeID (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.

Reviewed By: erichkeane, aaron.ballman

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

show more ...


Revision tags: llvmorg-16.0.1
# bfee6f11 04-Apr-2023 Bill Wendling <morbo@google.com>

[Clang][NFC] Refactor "Designators" to be more similar

This makes the two interfaces for designators more similar so that it's
easier to merge them together in a future refactoring.

Differential Re

[Clang][NFC] Refactor "Designators" to be more similar

This makes the two interfaces for designators more similar so that it's
easier to merge them together in a future refactoring.

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

show more ...


Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 554ba996 02-Mar-2023 Bill Wendling <morbo@google.com>

Revert "[Clang] Refactor "Designators" into a unified implementation [NFC]"

This reverts commit 3c07db5f58e9852f35202f0fffed50fc7506f37b.

This caused https://github.com/llvm/llvm-project/issues/611

Revert "[Clang] Refactor "Designators" into a unified implementation [NFC]"

This reverts commit 3c07db5f58e9852f35202f0fffed50fc7506f37b.

This caused https://github.com/llvm/llvm-project/issues/61118. Reverting
to ensure this is a pure NFC change.

show more ...


Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2
# 3c07db5f 07-Feb-2023 Bill Wendling <morbo@google.com>

[Clang] Refactor "Designators" into a unified implementation [NFC]

The interfaces for designators (i.e. C99 designated initializers) was
done in two slightly different ways. This was rather wasteful

[Clang] Refactor "Designators" into a unified implementation [NFC]

The interfaces for designators (i.e. C99 designated initializers) was
done in two slightly different ways. This was rather wasteful as the
differences could be combined into one.

Reviewed By: rsmith

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

show more ...


Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init
# 6ad0788c 14-Jan-2023 Kazu Hirata <kazu@google.com>

[clang] Use std::optional instead of llvm::Optional (NFC)

This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is p

[clang] Use std::optional instead of llvm::Optional (NFC)

This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# a1580d7b 14-Jan-2023 Kazu Hirata <kazu@google.com>

[clang] Add #include <optional> (NFC)

This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.

I'll post a separate patch to actually replace llvm::Option

[clang] Add #include <optional> (NFC)

This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.

I'll post a separate patch to actually replace llvm::Optional with
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


Revision tags: llvmorg-15.0.7
# a3c248db 06-Jan-2023 serge-sans-paille <sguelton@mozilla.com>

Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part

This is a follow-up to https://reviews.llvm.org/D140896, split into
several parts as it touches a lot of files.

Differential

Move from llvm::makeArrayRef to ArrayRef deduction guides - clang/ part

This is a follow-up to https://reviews.llvm.org/D140896, split into
several parts as it touches a lot of files.

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

show more ...


12345678910>>...30