History log of /llvm-project/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 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, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# d5953e3e 14-Dec-2023 Kazu Hirata <kazu@google.com>

[clangd] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,e

[clangd] Use StringRef::{starts,ends}_with (NFC)

This patch replaces uses of StringRef::{starts,ends}with with
StringRef::{starts,ends}_with for consistency with
std::{string,string_view}::{starts,ends}_with in C++20.

I'm planning to deprecate and eventually remove
StringRef::{starts,ends}with.

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, 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, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5
# 51df1a9a 24-May-2023 Kadir Cetinkaya <kadircet@google.com>

[clangd] Fix add-using tweak on declrefs with template arguments

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


Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1
# 7370e45f 24-Mar-2023 Kazu Hirata <kazu@google.com>

Fix warnings

This patch fixes:

clang/lib/Driver/ToolChains/OHOS.cpp:410:18: warning: unused
variable ‘A’ [-Wunused-variable]

clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:293:15:
w

Fix warnings

This patch fixes:

clang/lib/Driver/ToolChains/OHOS.cpp:410:18: warning: unused
variable ‘A’ [-Wunused-variable]

clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp:293:15:
warning: unused variable ‘II’ [-Wunused-variable]

llvm/lib/ProfileData/RawMemProfReader.cpp:364:68: warning: suggest
parentheses around ‘&&’ within ‘||’ [-Wparentheses]

show more ...


# 35c2aac6 20-Mar-2023 Kadir Cetinkaya <kadircet@google.com>

Revert "Revert "[clangd] Fix AddUsing in the face of typo-correction""

This reverts commit fb3f6a95393f33bc8d8550a5ac62c18e488a9b6f.


# fb3f6a95 20-Mar-2023 Kadir Cetinkaya <kadircet@google.com>

Revert "[clangd] Fix AddUsing in the face of typo-correction"

This reverts commit 6f23fee4ef98a695062aa128a177478ba7d742d4.
Breaks windows buildbots


# 6f23fee4 20-Mar-2023 Kadir Cetinkaya <kadircet@google.com>

[clangd] Fix AddUsing in the face of typo-correction

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

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


Revision tags: 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
# 6f3f1e98 04-Apr-2022 Sam McCall <sam.mccall@gmail.com>

[clangd] Remove trivial uses of FileEntry::getName

It's deprecated; migrate to FileEntryRef::getName where it doesn't matter.
Also change one subtle case of implicit FileEntry::getName to be explici

[clangd] Remove trivial uses of FileEntry::getName

It's deprecated; migrate to FileEntryRef::getName where it doesn't matter.
Also change one subtle case of implicit FileEntry::getName to be explicit.

After this patch, all the remaining FileEntry::getName calls are subtle
cases where we may be relying on exactly which filename variant is returned
(for indexing, IWYU directive handling, etc).

show more ...


# 46dbd19a 21-Mar-2022 Sam McCall <sam.mccall@gmail.com>

[clangd] Fix nullptr crash in AddUsing tweak on catch(...)

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


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 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-14.0.0-rc1, llvmorg-15-init
# 2f8da95e 01-Feb-2022 Christian Kühnel <kuhnel@google.com>

[clangd][nfc] cleanup of remaining clang-tidy findings

There were some left-overs (or new things) from the previous patches.

This will get us down to 0 open findings except:
clang-tidy is complaini

[clangd][nfc] cleanup of remaining clang-tidy findings

There were some left-overs (or new things) from the previous patches.

This will get us down to 0 open findings except:
clang-tidy is complaining in some files about
`warning: #includes are not sorted properly [llvm-include-order]`
however, clang-format does revert these changes.
It looks like clang-tidy and clang-format disagree there.

Not sure how we can fix that...

Reviewed By: sammccall

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

show more ...


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1
# ec4a2c95 15-Nov-2021 Christian Kühnel <kuhnel@google.com>

[NFC][clangd] cleanup llvm-else-after-return findings

Cleanup of clang-tidy findings: removing "else" after a return statement
to improve readability of the code.

This patch was created by applying

[NFC][clangd] cleanup llvm-else-after-return findings

Cleanup of clang-tidy findings: removing "else" after a return statement
to improve readability of the code.

This patch was created by applying the clang-tidy fixes automatically.

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

show more ...


# fbf17457 28-Oct-2021 Kadir Cetinkaya <kadircet@google.com>

[clangd] Escape error message in AddUsing

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


# 21745241 26-Oct-2021 Adam Czachorowski <adamcz@google.com>

[clangd] AddUsing: Fix support for template specializations.

Before this change, we would add "using std::vector<int>" instead of
just "using std::vector;", which would not even compile.

Fixes http

[clangd] AddUsing: Fix support for template specializations.

Before this change, we would add "using std::vector<int>" instead of
just "using std::vector;", which would not even compile.

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

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

show more ...


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
# 6aca6032 10-Jun-2021 Sam McCall <sam.mccall@gmail.com>

[AST] Include the TranslationUnitDecl when traversing with TraversalScope

Given `int foo, bar;`, TraverseAST reveals this tree:
TranslationUnitDecl
- foo
- bar

Before this patch, with the T

[AST] Include the TranslationUnitDecl when traversing with TraversalScope

Given `int foo, bar;`, TraverseAST reveals this tree:
TranslationUnitDecl
- foo
- bar

Before this patch, with the TraversalScope set to {foo}, TraverseAST yields:
foo

After this patch it yields:
TranslationUnitDecl
- foo

Also, TraverseDecl(TranslationUnitDecl) now respects the traversal scope.

---

The main effect of this today is that clang-tidy checks that match the
translationUnitDecl(), either in order to traverse it or check
parentage, should work.

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

show more ...


Revision tags: llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, 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
# c282b7de 03-Dec-2020 Adam Czachorowski <adamcz@google.com>

[clangd] AddUsing: Fix a crash on ElaboratedTypes without NestedNameSpecfiiers.

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


# 9d87739f 26-Nov-2020 Adam Czachorowski <adamcz@google.com>

[clangd] AddUsing: do not crash on non-namespace using decls.

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


Revision tags: llvmorg-11.0.1-rc1
# a200501b 23-Nov-2020 Adam Czachorowski <adamcz@google.com>

[clangd] Addusing tweak: find insertion point after definition

When type/function is defined in the middle of the file, previuosly we
would sometimes insert a "using" line before that definition, le

[clangd] Addusing tweak: find insertion point after definition

When type/function is defined in the middle of the file, previuosly we
would sometimes insert a "using" line before that definition, leading to
a compilation error. With this fix, we pick a point after such
definition in translation unit.

This is not a perfect solution. For example, it still doesn't handle
"using namespace" directives. It is, however, a significant improvement.

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

show more ...


# f6e59294 18-Nov-2020 Adam Czachorowski <adamcz@google.com>

[clangd] AddUsing: Used spelled text instead of type name.

This improves the behavior related to type aliases, as well as cases of
typo correction.

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

[clangd] AddUsing: Used spelled text instead of type name.

This improves the behavior related to type aliases, as well as cases of
typo correction.

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

show more ...


# aad3ea89 18-Nov-2020 Haojian Wu <hokein.wu@gmail.com>

[clangd] Remove the trailing "." in add-using message.

to be consistent witih other code actions.

Reviewed By: adamcz

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


Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5
# 17747d2e 28-Sep-2020 Sam McCall <sam.mccall@gmail.com>

[clangd] Remove Tweak::Intent, use CodeAction kind directly. NFC

Intent was a nice idea but it ends up being a bit awkward/heavyweight
without adding much.

In particular, it makes it hard to implem

[clangd] Remove Tweak::Intent, use CodeAction kind directly. NFC

Intent was a nice idea but it ends up being a bit awkward/heavyweight
without adding much.

In particular, it makes it hard to implement `CodeActionParams.only` properly
(there's an inheritance hierarchy for kinds).

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

show more ...


Revision tags: llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3
# c894bfd1 15-Sep-2020 Adam Czachorowski <adamcz@google.com>

[clangd] Add option for disabling AddUsing tweak on some namespaces.

For style guides forbid "using" declarations for namespaces like "std".
With this new config option, AddUsing can be selectively

[clangd] Add option for disabling AddUsing tweak on some namespaces.

For style guides forbid "using" declarations for namespaces like "std".
With this new config option, AddUsing can be selectively disabled on
those.

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

show more ...


# 687e1d71 14-Sep-2020 Sam McCall <sam.mccall@gmail.com>

[clangd] makeStringError,make_error<StringError> -> error()


# 4d90ff59 24-Aug-2020 Adam Czachorowski <adamcz@google.com>

[clangd] When inserting "using", add "::" in front if that's the style.

We guess the style based on the existing using declarations. If there
are any and they all start with ::, we add it to the new

[clangd] When inserting "using", add "::" in front if that's the style.

We guess the style based on the existing using declarations. If there
are any and they all start with ::, we add it to the newly added one
too.

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

show more ...


Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1
# 8e7bb37d 08-May-2020 Adam Czachorowski <adamcz@google.com>

[clangd] Fix crash in AddUsing tweak due to non-identifier DeclName

Patch by Adam Czachorowski!

Reviewers: hokein

Reviewed By: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadir

[clangd] Fix crash in AddUsing tweak due to non-identifier DeclName

Patch by Adam Czachorowski!

Reviewers: hokein

Reviewed By: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

show more ...


# 91087153 07-May-2020 Adam Czachorowski <adamcz@google.com>

[clangd] Fix AddUsing tweak for out-of-line functions.

Summary:
We used getEnclosingNamespaceContext(), which calls getParent() rather
than getLexicalParent(), so we would end up adding the "using"

[clangd] Fix AddUsing tweak for out-of-line functions.

Summary:
We used getEnclosingNamespaceContext(), which calls getParent() rather
than getLexicalParent(), so we would end up adding the "using" line in
places that do not affect the cursor location, or just return an error
when declaration was in another file.

Patch by Adam Czachorowski!

Reviewers: hokein

Reviewed By: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

show more ...


12