Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
d01c11df |
| 13-Dec-2024 |
Kazu Hirata <kazu@google.com> |
[clang] Migrate away from PointerUnion::{is,get} (NFC) (#119724)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn
[clang] Migrate away from PointerUnion::{is,get} (NFC) (#119724)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
show more ...
|
#
02dd73a5 |
| 12-Dec-2024 |
Kazu Hirata <kazu@google.com> |
[clang] Migrate away from PointerUnion::{is,get} (NFC) (#119654)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn
[clang] Migrate away from PointerUnion::{is,get} (NFC) (#119654)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
show more ...
|
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 |
|
#
2bde13cd |
| 22-May-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (#92852)
This is an enabler for https://github.com/llvm/llvm-project/pull/92855
This allows an NTTP default argument to be set as an a
[clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (#92852)
This is an enabler for https://github.com/llvm/llvm-project/pull/92855
This allows an NTTP default argument to be set as an arbitrary TemplateArgument, not just an expression. This allows template parameter packs to have default arguments in the AST, even though the language proper doesn't support the syntax for it.
This allows NTTP default arguments to be other kinds of arguments, like packs, integral constants, and such.
show more ...
|
#
e42b799b |
| 21-May-2024 |
Matheus Izvekov <mizvekov@gmail.com> |
[clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (#92854)
This is an enabler for a future patch.
This allows an type-parameter default argument to be set as an arbitrary
Temp
[clang] NFCI: use TemplateArgumentLoc for type-param DefaultArgument (#92854)
This is an enabler for a future patch.
This allows an type-parameter default argument to be set as an arbitrary
TemplateArgument, not just a type.
This allows template parameter packs to have default arguments in the
AST, even though the language proper doesn't support the syntax for it.
This will be used in a later patch which synthesizes template parameter
lists with arbitrary default arguments taken from template
specializations.
There are a few places we used SubsType, because we only had a type, now
we use SubstTemplateArgument.
SubstTemplateArgument was missing arguments for setting Instantiation
location and entity names.
Adding those is needed so we don't regress in diagnostics.
show more ...
|
Revision tags: llvmorg-18.1.6 |
|
#
12028373 |
| 14-May-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (#91393)
Reapplies #81642, fixing the crash which occurs when runni
Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (#91393)
Reapplies #81642, fixing the crash which occurs when running the lldb test suite.
show more ...
|
#
c6855ab2 |
| 07-May-2024 |
Adrian Prantl <aprantl@apple.com> |
Revert "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)"
This reverts commit 7115ed0fff027b65fa76fdfae215ed1382ed1473.
This
Revert "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)"
This reverts commit 7115ed0fff027b65fa76fdfae215ed1382ed1473.
This commit broke several LLDB tests.
https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/3480/
show more ...
|
#
7115ed0f |
| 07-May-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)
Our current method of storing the template arguments as written for
`(Class/
[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)
Our current method of storing the template arguments as written for
`(Class/Var)Template(Partial)SpecializationDecl` suffers from a number
of flaws:
- We use `TypeSourceInfo` to store `TemplateArgumentLocs` for class
template/variable template partial/explicit specializations. For
variable template specializations, this is a rather unintuitive hack (as
we store a non-type specialization as a type). Moreover, we don't ever
*need* the type as written -- in almost all cases, we only want the
template arguments (e.g. in tooling use-cases).
- The template arguments as written are stored in a number of redundant
data members. For example, `(Class/Var)TemplatePartialSpecialization`
have their own `ArgsAsWritten` member that stores an
`ASTTemplateArgumentListInfo` (the template arguments).
`VarTemplateSpecializationDecl` has yet _another_ redundant member
"`TemplateArgsInfo`" that also stores an `ASTTemplateArgumentListInfo`.
This patch eliminates all
`(Class/Var)Template(Partial)SpecializationDecl` members which store the
template arguments as written, and turns the `ExplicitInfo` member into
a `llvm::PointerUnion<const ASTTemplateArgumentListInfo*,
ExplicitInstantiationInfo*>` (to avoid unnecessary allocations when the
declaration isn't an explicit instantiation). The template arguments as
written are now accessed via `getTemplateArgsWritten` in all cases.
The "most breaking" change is to AST Matchers, insofar that `hasTypeLoc`
will no longer match class template specializations (since they no
longer store the type as written).
show more ...
|
Revision tags: 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, 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 |
|
#
c3075023 |
| 20-Jun-2023 |
Nathan Ridge <zeratul976@hotmail.com> |
[clangd] Index the type of a non-type template parameter
Fixes https://github.com/clangd/clangd/issues/1666
Differential Revision: https://reviews.llvm.org/D153251
|
Revision tags: 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 |
|
#
75e16fd2 |
| 26-Apr-2022 |
Ilya Biryukov <ibiryukov@google.com> |
[Index] [clangd] Support for concept declarations and requires expressions
Add support for concepts and requires expression in the clang index. Genarate USRs for concepts.
Also change how `Recursiv
[Index] [clangd] Support for concept declarations and requires expressions
Add support for concepts and requires expression in the clang index. Genarate USRs for concepts.
Also change how `RecursiveASTVisitor` handles return type requirement in requires expressions. The new code unpacks the synthetic template parameter list used for storing the actual expression. This simplifies implementation of the indexing. No code seems to depend on the original traversal anyway and the synthesized template parameter list is easily accessible from inside the requires expression if needed.
Add tests in the clangd codebase.
Fixes https://github.com/clangd/clangd/issues/1103.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D124441
show more ...
|
Revision tags: llvmorg-14.0.2 |
|
#
089b6efe |
| 22-Apr-2022 |
Ben Barham <ben_barham@apple.com> |
[Index] Remove reference to `UnresolvedUsingIfExists`
Assuming `ns::foo` doesn't exist, given: ``` using ns::foo __attribute__((using_if_exists)); ```
The AST will look something like: UsingDecl
[Index] Remove reference to `UnresolvedUsingIfExists`
Assuming `ns::foo` doesn't exist, given: ``` using ns::foo __attribute__((using_if_exists)); ```
The AST will look something like: UsingDecl UsingShadowDecl UnresolvedUsingIfExistsDecl
Thus we end up adding a reference to `UnresolvedUsingIfExistsDecl` when processing `UsingDecl`, but never add the decl itself. In this case the decl is really the `UsingDecl` anyway though (which we do output), so it makes more sense to just remove the extra reference.
Differential Revision: https://reviews.llvm.org/D124288
show more ...
|
Revision tags: 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 |
|
#
9ab9caf2 |
| 06-Oct-2021 |
Kadir Cetinkaya <kadircet@google.com> |
[clang] Visit enum base specifiers in libIndex
Fixes https://github.com/clangd/clangd/issues/878.
Differential Revision: https://reviews.llvm.org/D111260
|
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 |
|
#
a3a8a1a1 |
| 06-May-2021 |
Alex Hoppen <ahoppen@apple.com> |
[Index] Ignore nullptr decls for indexing
We can end up with a call to `indexTopLevelDecl(D)` with `D == nullptr` in non-assert builds e.g. when indexing a module in `indexModule` and - `ASTReader::
[Index] Ignore nullptr decls for indexing
We can end up with a call to `indexTopLevelDecl(D)` with `D == nullptr` in non-assert builds e.g. when indexing a module in `indexModule` and - `ASTReader::GetDecl` returns `nullptr` if `Index >= DeclsLoaded.size()`, thus returning `nullptr` => `ModuleDeclIterator::operator*` returns `nullptr` => we call `IndexCtx.indexTopLevelDecl` with `nullptr`
Be resilient and just ignore the `nullptr` decls during indexing.
Reviewed By: akyrtzi
Differential Revision: https://reviews.llvm.org/D102001
show more ...
|
Revision tags: 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, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, 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 |
|
#
1abb883a |
| 20-May-2020 |
Sam McCall <sam.mccall@gmail.com> |
[clangd] Don't traverse the AST within uninteresting files during indexing
Summary: We already skip function bodies from these files while parsing, and drop symbols found in them. However, traversin
[clangd] Don't traverse the AST within uninteresting files during indexing
Summary: We already skip function bodies from these files while parsing, and drop symbols found in them. However, traversing their ASTs still takes a substantial amount of time.
Non-scientific benchmark on my machine: background-indexing llvm-project (llvm+clang+clang-tools-extra), wall time before: 7:46 after: 5:13 change: -33%
Indexer.cpp libclang should be updated too, I'm less familiar with that code, and it's doing tricky things with the ShouldSkipFunctionBody callback, so it needs to be done separately.
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80296
show more ...
|
Revision tags: llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
466f8843 |
| 18-Feb-2020 |
Jim Lin <tclin914@gmail.com> |
[NFC] Remove trailing space
sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h,td}
|
Revision tags: llvmorg-10.0.0-rc2 |
|
#
af8b0cd5 |
| 12-Feb-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[clang][Index] Visit the default parameter arguements in libindex.
Summary: We are missing the default parmeter arguments when IndexFunctionLocals is true.
Fixes https://github.com/clangd/clangd/is
[clang][Index] Visit the default parameter arguements in libindex.
Summary: We are missing the default parmeter arguments when IndexFunctionLocals is true.
Fixes https://github.com/clangd/clangd/issues/285.
Reviewers: kadircet
Subscribers: kristof.beyls, ilya-biryukov, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74610
show more ...
|
Revision tags: llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
60573ae6 |
| 16-Nov-2019 |
Reid Kleckner <rnk@google.com> |
Remove Expr.h include from ASTContext.h, NFC
ASTContext.h is popular, prune its includes. Expr.h brings in Attr.h, which is also expensive.
Move BlockVarCopyInit to Expr.h to accomplish this.
|
#
2073dd2d |
| 04-Nov-2019 |
Adrian Prantl <aprantl@apple.com> |
Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.
This patch is motivated by (and factored out from) https://reviews.llvm.org/D66121 which is a debug in
Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.
This patch is motivated by (and factored out from) https://reviews.llvm.org/D66121 which is a debug info bugfix. Starting with DWARF 5 all Objective-C methods are nested inside their containing type, and that patch implements this for synthesized Objective-C properties.
1. SemaObjCProperty populates a list of synthesized accessors that may need to inserted into an ObjCImplDecl.
2. SemaDeclObjC::ActOnEnd inserts forward-declarations for all accessors for which no override was provided into their ObjCImplDecl. This patch does *not* synthesize AST function *bodies*. Moving that code from the static analyzer into Sema may be a good idea though.
3. Places that expect all methods to have bodies have been updated.
I did not update the static analyzer's inliner for synthesized properties to point back to the property declaration (see test/Analysis/Inputs/expected-plists/nullability-notes.m.plist), which I believed to be more bug than a feature.
Differential Revision: https://reviews.llvm.org/D68108
rdar://problem/53782400
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 |
|
#
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 ...
|
#
d7aae33a |
| 10-Jul-2019 |
Saar Raz <saar@raz.email> |
[Concepts] Concept definitions (D40381)
First in a series of patches to land C++2a Concepts support. This patch adds AST and parsing support for concept-declarations.
llvm-svn: 365699
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4 |
|
#
e7eb27a9 |
| 08-Mar-2019 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Index] Mark references from Constructors and Destructors to class as NameReference
Summary: In current indexing logic we get references to class itself when we see a constructor/destructor w
[clang][Index] Mark references from Constructors and Destructors to class as NameReference
Summary: In current indexing logic we get references to class itself when we see a constructor/destructor which is only syntactically true. Semantically this information is not correct. This patch marks that reference as NameReference to let clients deal with it.
Reviewers: akyrtzi, gribozavr, nathawes, benlangmuir
Reviewed By: gribozavr, nathawes
Subscribers: nathawes, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58814
llvm-svn: 355668
show more ...
|
Revision tags: llvmorg-8.0.0-rc3 |
|
#
4b0f7f99 |
| 27-Feb-2019 |
Volodymyr Sapsai <vsapsai@apple.com> |
[index] Improve indexing support for MSPropertyDecl.
Currently the symbol for MSPropertyDecl has kind `SymbolKind::Unknown` which can trip up various indexing tools.
rdar://problem/46764224
Review
[index] Improve indexing support for MSPropertyDecl.
Currently the symbol for MSPropertyDecl has kind `SymbolKind::Unknown` which can trip up various indexing tools.
rdar://problem/46764224
Reviewers: akyrtzi, benlangmuir, jkorous
Reviewed By: jkorous
Subscribers: dexonsmith, cfe-commits, jkorous, jdoerfert, arphaman
Differential Revision: https://reviews.llvm.org/D57628
llvm-svn: 354942
show more ...
|
#
a87ada0d |
| 26-Feb-2019 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Index] Visit UsingDecls and generate USRs for them
Summary: Add indexing of UsingDecl itself. Also enable generation of USRs for UsingDecls, using the qualified name of the decl.
Reviewers:
[clang][Index] Visit UsingDecls and generate USRs for them
Summary: Add indexing of UsingDecl itself. Also enable generation of USRs for UsingDecls, using the qualified name of the decl.
Reviewers: ilya-biryukov, akyrtzi
Subscribers: arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58340
llvm-svn: 354878
show more ...
|
#
b780517c |
| 21-Feb-2019 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Index] Enable indexing of Template Type Parameters behind a flag
Summary: clangd uses indexing api to provide references and it was not possible to perform symbol information for template pa
[clang][Index] Enable indexing of Template Type Parameters behind a flag
Summary: clangd uses indexing api to provide references and it was not possible to perform symbol information for template parameters. This patch enables visiting of TemplateTypeParmTypeLocs.
Reviewers: ilya-biryukov, akyrtzi
Subscribers: javed.absar, kristof.beyls, ioeric, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D58293
llvm-svn: 354560
show more ...
|
#
0468fc0b |
| 11-Feb-2019 |
Kadir Cetinkaya <kadircet@google.com> |
[clang][Index] Add a knob to index function parameters in declarations
Summary: Parameters in declarations are useful for clangd, so that we can provide symbol information for them as well. It also
[clang][Index] Add a knob to index function parameters in declarations
Summary: Parameters in declarations are useful for clangd, so that we can provide symbol information for them as well. It also helps clangd to be consistent whether a function's definition is accessible or not.
Reviewers: hokein, akyrtzi
Subscribers: ilya-biryukov, ioeric, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D57949
llvm-svn: 353695
show more ...
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
#
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <chandlerc@gmail.com> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|