| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/62185
Differential Revision: https://reviews.llvm.org/D148552
|
|
|
|
|
|
|
| |
Instantiation pattern is null for incomplete template types and using
specializaiton decl results in not seeing re-declarations.
Differential Revision: https://reviews.llvm.org/D148158
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Principal here is:
- Making sure each template instantiation implies use of the most specialized
template. As explicit instantiations/specializations are not redeclarations of
the primary template.
- Introducing a use from explicit instantions/specializaitons to the primary
template, as they're required but not traversed as part of the RAV.
Differential Revision: https://reviews.llvm.org/D148112
|
|
|
|
|
|
|
|
|
|
|
| |
Certain standard library functions (e.g. std::move) are also implemented
as builtins. This patch moves filtering logic to the symbol->header
mapping phase to rather generate these references without any providers
only when we don't have a mapping.
That way we can also map them to header names mentioned in the builtin
mappings.
Differential Revision: https://reviews.llvm.org/D147449
|
|
|
|
|
|
| |
26ff268b80c589fd9f71c1c214af77cd972642ca treated member operator calls
as explicit, while trying to treat them the same way as regular member
expressions, which should've been implicit.
|
|
|
|
|
|
|
| |
Missing these references can result in false negatives in the used-ness
analysis and break builds.
Differential Revision: https://reviews.llvm.org/D147144
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no need to add headers for builtin symbols.
Additionally, there is a bonus benefit which help eliminate some bugs -- builtin
functions are modeled as implicit FunctionDecls in the clang AST, which results in
them being treated as normal FunctionDecls in the implementation of the include-cleaner
(going through the path: ast-node -> decl -> source location -> header).
And, the source location of these built-in symbols' AST nodes is not precise (e.g. points to the first call site),
which leads to subtle behavior that inserts a header of the call site.
Differential Revision: https://reviews.llvm.org/D147213
|
|
|
|
|
|
| |
Fixes https://github.com/clangd/clangd/issues/1554
Differential Revision: https://reviews.llvm.org/D147135
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D146727
|
|
|
|
|
|
|
|
|
| |
Make sure unresolved headers are not analyzed as part of unused
includes.
Also introduces a testing fixture for analyze tests
Differential Revision: https://reviews.llvm.org/D146916
|
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/61652
Differential Revision: https://reviews.llvm.org/D146732
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D144976
|
|
|
|
|
|
| |
Private headers inside umbrella files shouldn't be marked as unused.
Differential Revision: https://reviews.llvm.org/D146406
|
|
|
|
|
|
|
|
|
|
|
| |
3e78fa860235431323aaf08c8fa922d75a7cfffa
TemplateName::getAsTemplateDecl() returns the underlying TemplateDecl
for a UsingTemplate kind template name. We should respect that in the
Profile method otherwise we might desugar the template name unexpectedly
(e.g. for template argument deduction with deduciton guides).
Differential Revision: https://reviews.llvm.org/D146202
|
| |
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/61221
|
|
|
|
|
|
| |
This reverts commit fd8c9ef20a9519dccd5b8178b29ed4574285d36f.
Differential Revision: https://reviews.llvm.org/D145577
|
|
|
|
| |
This reverts commit 85a5c17b66768353b7fff717904e42805bb6a547.
|
|
|
|
| |
This reverts commit 9814b4d07f614e83e7a244f74fc562f2b5cc9b15.
|
|
|
|
| |
This reverts commit 85a5c17b66768353b7fff717904e42805bb6a547.
|
|
|
|
| |
This reverts commit 2eb5ac99a76dbbf8ac68c538211fabeaa5ac0bfd.
|
|
|
|
|
| |
This reverts commit 38b9fb5a129db3e086610d53b534833273c5b4d0.
Breaks tests on Windows, see comments on https://reviews.llvm.org/D143496
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D143496
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D145364
|
|
|
|
| |
incompatible flags in the CLI tool.
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/60884.
|
|
|
|
|
|
|
|
|
|
|
| |
Treating constructor calls when the type name isn't explicitly spelled
can cause spurious results, so turn them into implicit references.
This doesn't change the behaviour for constructor calls that explicitly spell
the type name, as we should see a reference through the typeloc.
Fixes https://github.com/llvm/llvm-project/issues/60812
Differential Revision: https://reviews.llvm.org/D144582
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D144579
|
|
|
|
|
|
|
| |
By special-casing them at the moment. The tooling stdlib lib doesn't
support these symbols (most important one is std::move).
Differential Revision: https://reviews.llvm.org/D143906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e70ca7b35319a3621f9d9c6475926428f8c5c000 and the
followup patch "[clang] Fix the location of UsingTypeLoc"
(ebbeb164c25a40cb6ba9c6b18dce5dcd06c0bb07).
The patch causes an incorrect lookup result:
```
namespace ns { struct Foo { };}
using ns::Foo;
void test() {
struct Foo {
} k; // the type of k refers to ns::Foo, rather than the local Foo!
}
```
|
| |
|
|
|
|
|
|
| |
Introduce signals to rank providers of a symbol.
Differential Revision: https://reviews.llvm.org/D139921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support building UsingType for elaborated type specifiers:
```
namespace ns { class Foo {}; }
using ns::Foo;
// The TypeLoc of `Foo` below should be a ElaboratedTypeLoc with an
// inner UsingTypeLoc rather than the underlying `CXXRecordTypeLoc`
class Foo foo;
```
Differential Revision: https://reviews.llvm.org/D141280
|
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/59927
Differential Revision: https://reviews.llvm.org/D141670
|
|
|
|
| |
This FIXME was addressed in 0e545816a9e582af29ea4b9441fea8ed376cf52a.
|
|
|
|
|
|
|
|
| |
The Annotations helper class does not have a gtest or gmock dependency, but because it's bundled with the rest of TestingSupport, it gets one. By splitting it out, a target can use it without being forced to use LLVM's copy of gtest.
Reviewed By: GMNGeoffrey, sammccall, gribozavr2
Differential Revision: https://reviews.llvm.org/D141175
|
|
|
|
|
|
| |
Per the discussion in https://github.com/llvm/llvm-project/issues/59916.
Differential Revision: https://reviews.llvm.org/D141592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HeaderSearch uses FileEntry::getName() to determine the best spelling of a
header. FileEntry::getName() is now the name of the *last* retrieved ref.
This means that when FileManager::getFile() hits an existing inode through a new
path, it changes the spelling of that header.
In the absence of explicit logic to track the preferred name(s) of header files,
we should avoid gratuitously calling getFile() with paths different than how
the header was originally included, such as the result of realpath().
The originally-specified path should be fine here:
- if the same filemanager is being used for record/analysis, we'll hit the
filename cache
- if a different filemanager is being used e.g. preamble scenario, we should
get the same result unless either the working directory has changed (which it
shouldn't, else many other things will fail) or the file has gone/changed
inode (in which case the old method doesn't work either)
Needless to say this is fragile, but talking to @kadircet offline, it's good
enough for our purposes for now.
Differential Revision: https://reviews.llvm.org/D141478
|
|
|
|
|
|
|
| |
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/D141298
|
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/59655
Differential Revision: https://reviews.llvm.org/D140551
|
|
|
|
|
| |
Fix: https://github.com/llvm/llvm-project/issues/59825
Differential Revision: https://reviews.llvm.org/D141271
|
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/59541.
Differential Revision: https://reviews.llvm.org/D140380
|
|
|
|
|
|
|
|
|
|
|
| |
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage
of OptionalStorage. To keep this working old Optional stays around as
clang::CustomizableOptional, with the default Storage removed.
Optional<File/DirectoryEntryRef> is replaced with a typedef.
I tested this with GCC 7.5, the oldest supported GCC I had around.
Differential Revision: https://reviews.llvm.org/D140332
|
|
|
|
|
|
| |
Per the discussion on https://reviews.llvm.org/D140095#inline-1352956
Differential Revision: https://reviews.llvm.org/D140284
|
|
|
|
|
|
| |
Use expansion locations for target symbol decls when finding headers for macros.
Fix: https://github.com/llvm/llvm-project/issues/59392
Differential Revision: https://reviews.llvm.org/D139716
|
|
|
|
|
|
|
| |
Handles dependent type members in AST.
Fix: https://github.com/llvm/llvm-project/issues/59354
Differential Revision: https://reviews.llvm.org/D139409
|
|
|
|
| |
I forgot to add the change to the commit when committing.
|
|
|
|
|
|
| |
Fixes https://github.com/llvm/llvm-project/issues/59533
Differential Revision: https://reviews.llvm.org/D140095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::optional"
This reverts commit 8f0df9f3bbc6d7f3d5cbfd955c5ee4404c53a75d.
The Optional*RefDegradesTo*EntryPtr types want to keep the same size as
the underlying type, which std::optional doesn't guarantee. For use with
llvm::Optional, they define their own storage class, and there is no way
to do that in std::optional.
On top of that, that commit broke builds with older GCCs, where
std::optional was not trivially copyable (static_assert in the clang
sources was failing).
|