Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6
# 8d714db7 11-Dec-2024 Christian Kandeler <christian.kandeler@qt.io>

[clangd] Consider expression statements in ExtractVariable tweak (#112525)

For instance:
int func();
int main()
{
func(); // => auto placeholder = func();
}


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2
# 28670959 16-Mar-2024 alirezamoshtaghi <124719818+alirezamoshtaghi@users.noreply.github.com>

[clang] Skip implicit designators in DesignatedInitExpr::getBeginLoc (#83369)

Fixes https://github.com/llvm/llvm-project/issues/83185


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# c9974ae4 19-Feb-2024 Christian Kandeler <christian.kandeler@qt.io>

[clangd] Do not offer extraction to variable for decl init expression (#69477)

That would turn:
int x = f() + 1;
into:
auto placeholder = f() + 1;
int x = placeholder;
which makes little

[clangd] Do not offer extraction to variable for decl init expression (#69477)

That would turn:
int x = f() + 1;
into:
auto placeholder = f() + 1;
int x = placeholder;
which makes little sense and is clearly not intended, as stated
explicitly by a comment in eligibleForExtraction(). It appears that the
declaration case was simply forgotten (the assignment case was already
implemented).

show more ...


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# 5bd0f0d9 11-Nov-2023 Björn Pettersson <bjorn.a.pettersson@ericsson.com>

[clangd] Check for valid location in ExtractionContext::exprIsValidOutside (#71162)

If the code has a call to an implicitly declared function, an expression
could end up referencing declarations wi

[clangd] Check for valid location in ExtractionContext::exprIsValidOutside (#71162)

If the code has a call to an implicitly declared function, an expression
could end up referencing declarations without valid source locations. So
when doing the exprIsValidOutside check we could end up calling
SourceManager::isPointWithin using invalid source locations, and then a
debug build would crash with an assertion failure in
SourceManager::isBeforeInTranslationUnit.

This patch make sure that we deal with the invalid locations (by
considering a ReferencedDecl with invalid location as not being inside
the Scope).

show more ...


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# 94b14355 11-Sep-2023 Julian Schmidt <44101708+5chmidti@users.noreply.github.com>

[clangd] allow extracting to variable for lambda expressions

Support for extracting lambda expressions, e.g. extracting a lambda from a callexpr (e.g. algorithms/ranges) to a named variable.

Review

[clangd] allow extracting to variable for lambda expressions

Support for extracting lambda expressions, e.g. extracting a lambda from a callexpr (e.g. algorithms/ranges) to a named variable.

Reviewed By: nridge

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

show more ...


Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1
# 67e22983 10-Oct-2021 Matheus Izvekov <mizvekov@gmail.com>

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same, and there
is some result type which is resolved as either one of them (typically LHS for
consistency).

We change those cases to resolve as the common sugared type between those two,
utilizing the new infrastructure created for this purpose.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

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

show more ...


# 1d1a98e9 16-Sep-2022 Matheus Izvekov <mizvekov@gmail.com>

Revert "[clang] use getCommonSugar in an assortment of places"

This reverts commit aff1f6310e5f4cea92c4504853d5fd824754a74f.


# aff1f631 10-Oct-2021 Matheus Izvekov <mizvekov@gmail.com>

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same, and there
is some result type which is resolved as either one of them (typically LHS for
consistency).

We change those cases to resolve as the common sugared type between those two,
utilizing the new infrastructure created for this purpose.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

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

show more ...


# d8c09b7b 09-Sep-2022 Fangrui Song <i@maskray.me>

Revert D111509 "[clang] use getCommonSugar in an assortment of places"

This reverts commit d42122cd5db021e6b14a90a98ad1dd09412efb4c.

`clang++ gcc/libstdc++-v3/src/c++98/complex_io.cc` (all language

Revert D111509 "[clang] use getCommonSugar in an assortment of places"

This reverts commit d42122cd5db021e6b14a90a98ad1dd09412efb4c.

`clang++ gcc/libstdc++-v3/src/c++98/complex_io.cc` (all language modes) crashes.
Also see https://reviews.llvm.org/D111509#3777980

show more ...


# d42122cd 10-Oct-2021 Matheus Izvekov <mizvekov@gmail.com>

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same

[clang] use getCommonSugar in an assortment of places

For this patch, a simple search was performed for patterns where there are
two types (usually an LHS and an RHS) which are structurally the same, and there
is some result type which is resolved as either one of them (typically LHS for
consistency).

We change those cases to resolve as the common sugared type between those two,
utilizing the new infrastructure created for this purpose.

Depends on D111283

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

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

show more ...


# c797952d 31-May-2022 David Goldman <davg@google.com>

[clangd] Minor fixes to ExtractVariableTests missed in D124486


# ae67984c 26-Apr-2022 David Goldman <davg@google.com>

[clangd] ExtractVariable support for C and Objective-C

- Use the expression's type for non-C++ as the variable type. This works
well, but might not preserve the typedefs due to type
canonicaliza

[clangd] ExtractVariable support for C and Objective-C

- Use the expression's type for non-C++ as the variable type. This works
well, but might not preserve the typedefs due to type
canonicalization.

- Improve support for Objective-C property references which are
represented using `ObjCPropertyRefExpr` and `BuiltinType::PseudoObject`.

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

show more ...


# 4d006520 26-Feb-2022 Sam McCall <sam.mccall@gmail.com>

[clangd] Clean up unused includes. NFCI

Add includes where needed to fix build.
Haven't systematically added used headers, so there is still accidental
dependency on transitive includes.


Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4
# f71404c3 22-Mar-2021 Kadir Cetinkaya <kadircet@google.com>

[clangd] Replace usages of dummy with more descriptive words

Dummy is a word with inappropriate associations. This patch updates the
references to it in clangd code base with more precise ones.

The

[clangd] Replace usages of dummy with more descriptive words

Dummy is a word with inappropriate associations. This patch updates the
references to it in clangd code base with more precise ones.

The only user-visible change is the default variable name used when extracting a
variable. It will be named as `placeholder` from now on.

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

show more ...


Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2
# 5934a791 09-Dec-2020 Adam Czachorowski <adamcz@google.com>

[clangd] Split tweak tests into one file per tweak.

No changes to the tests themselves, other than some auto -> const auto
diagnostic fixes and formatting.

Differential Revision: https://reviews.ll

[clangd] Split tweak tests into one file per tweak.

No changes to the tests themselves, other than some auto -> const auto
diagnostic fixes and formatting.

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

show more ...