| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: teemperor!
Subscribers: jholewinski, whisperity, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50350
llvm-svn: 339385
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With IndexImplicitInstantiation=true, the following case records an occurrence of B::bar in A::foo, which will benefit cross reference tools.
template <class T> struct B { void bar() {}};
template <class T> struct A { void foo(B<T> *x) { x->bar(); }};
int main() { A<int> a; a.foo(0); }
Reviewers: akyrtzi, arphaman, rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D49002
llvm-svn: 336606
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is similar to the LLVM change https://reviews.llvm.org/D46290.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.
Patch produced by
for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46320
llvm-svn: 331834
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TemplateTemplateParmDecls of alias templates
TemplateTemplateParmDecls of alias templates ended-up serialized as 'file-level decls' which was causing a crash while trying to index a PCH/module file that contained them.
Commit makes sure TemplateTemplateParmDecls are not recorded as such kind of decls.
Fixes crash of rdar://36608297
Differential Revision: https://reviews.llvm.org/D42588
llvm-svn: 323549
|
|
|
|
|
|
| |
Convert most uses to range-for loops. No functionality change intended.
llvm-svn: 320954
|
|
|
|
|
|
|
|
|
| |
The 'decl' role is more canonical than the 'ref'. This helps us establish the
'specialization-of' relation just by looking at decls or defs.
rdar://31884960
llvm-svn: 317832
|
|
|
|
|
|
|
|
| |
rdar://33058798
Differential Revision: https://reviews.llvm.org/D38755
llvm-svn: 315367
|
|
|
|
|
|
|
|
|
|
|
| |
In dependent contexts we end up referencing these, so make sure they
have USRs, and have their declarations indexed. For the most part they
behave like typedefs, but we also need to worry about having multiple
using declarations with the same "name".
rdar://problem/33883650
llvm-svn: 311053
|
|
|
|
|
|
|
|
|
|
|
| |
CXXDeductionGuideDecls can't be referenced so there's no need to output a symbol occurrence for them.
Also handle DeducedTemplateSpecializationTypeLocs in the TypeIndexer so we don't miss the symbol occurrences of the corresponding template decls.
Patch by Nathan Hawes!
Differential Revision: https://reviews.llvm.org/D36641
llvm-svn: 310933
|
|
|
|
|
|
|
|
| |
class template specialization
rdar://33122110
llvm-svn: 307074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of class template specializations
This commit fixes an issue where a forward declaration of a class template
specialization was not related to the base template. We need to relate even
forward declarations because specializations don't have to be defined.
rdar://32869409
Differential Revision: https://reviews.llvm.org/D34462
llvm-svn: 305996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"specializationOf" relation if they pseudo-override a type in the base template
This commit fixes an issue where Xcode's renaming engine couldn't find the
reference to the second occurrence of "InnerClass" in this example:
template<typename T> struct Ts { template<typename U> struct InnerClass { }; };
template<> struct Ts<int> {
template<typename U> struct InnerClass; // This occurrence wasn't renamed
};
rdar://31884960
Differential Revision: https://reviews.llvm.org/D34392
llvm-svn: 305911
|
|
|
|
|
|
|
|
| |
The global C++17 binding declarations should be indexed as variable symbols.
Differential Revision: https://reviews.llvm.org/D33920
llvm-svn: 305508
|
|
|
|
|
|
|
|
|
|
| |
static_assert declarations have to be visited while indexing so that we can
gather the references to declarations that are present in their assert
expression.
Differential Revision: https://reviews.llvm.org/D33913
llvm-svn: 305504
|
|
|
|
|
|
| |
rdar://32323724
llvm-svn: 303568
|
|
|
|
|
|
| |
rdar://32323386
llvm-svn: 303563
|
|
|
|
|
|
| |
rdar://32323315
llvm-svn: 303559
|
|
|
|
|
|
|
|
| |
the reference to the namespace
rdar://32323190
llvm-svn: 303555
|
|
|
|
|
|
| |
rdar://32195226
llvm-svn: 303048
|
|
|
|
|
|
|
|
| |
Also ensure that class template specialization arguments are covered
rdar://31812032
llvm-svn: 302918
|
|
|
|
|
|
|
|
|
|
| |
specializations that 'override' declarations in the base template should use
the 'specializationOf' relation instead of 'specializationOf | overrideOf'.
The indexer relations are meant to be orthogonal, so 'specializationOf' is
better than the combined relation.
llvm-svn: 302136
|
|
|
|
| |
llvm-svn: 301548
|
|
|
|
|
|
| |
rdar://31758344
llvm-svn: 301315
|
|
|
|
|
|
| |
rdar://31603531
llvm-svn: 301310
|
|
|
|
|
|
|
|
|
|
|
|
| |
that 'override' declarations in the base template should be recorded
This can be used for improved "go to definition" feature in Xcode.
rdar://31604739
Differential Revision: https://reviews.llvm.org/D32020
llvm-svn: 301180
|
|
|
|
|
|
|
|
|
| |
purposes
- Ignore decls marked as 'generated_declaration'
- Include the 'defined_in' in the USR for additional namespacing
llvm-svn: 300949
|
|
|
|
| |
llvm-svn: 300948
|
|
|
|
|
|
|
|
|
|
| |
relationship
rdar://31603531
Differential Revision: https://reviews.llvm.org/D32010
llvm-svn: 300832
|
|
|
|
|
|
|
|
|
|
| |
its underlying tag type
In such a case, as when using the NS_ENUM macro, for indexing purposes treat the typedef as 'transparent',
meaning we treat its references as symbols of the underlying tag symbol.
Also provide a libclang API to check for such typedefs.
llvm-svn: 298392
|
|
|
|
|
|
|
|
|
| |
where its name appears in definitions and declarations
Patch by Nathan Hawes!
https://reviews.llvm.org/D30730
llvm-svn: 298170
|
|
|
|
|
|
|
|
|
|
|
| |
related property getter/setter role fixes
This enhances the AST to keep track of locations of the names in those ObjC property attributes, and reports them for indexing.
Patch by Nathan Hawes!
https://reviews.llvm.org/D30907
llvm-svn: 297972
|
|
|
|
|
|
|
|
|
| |
declarations
- Report the typedef reference occurrence
- Mark super or protocol references as 'implicit' when they come from a typedef.
llvm-svn: 296974
|
|
|
|
|
|
|
|
|
|
|
|
| |
associated ivars.
Related synthesized properties with the ivar they use with the 'accessor' relation, and make sure
we mark them 'implicit' when appropriate.
Patch by Nathan Hawes!
https://reviews.llvm.org/D30012
llvm-svn: 295416
|
|
|
|
|
|
|
|
|
| |
location.
Instead of using the location of the beginning '-'/'+'.
This is consistent with location used for function decls and ObjC method calls where we use the base name as the location as well.
llvm-svn: 293134
|
|
|
|
|
|
| |
We currently are unable to get a USR for those and it doesn't seem useful to try to index them.
llvm-svn: 291705
|
|
|
|
|
|
| |
properties with IBOutletCollection.
llvm-svn: 291703
|
|
|
|
|
|
|
|
|
|
|
| |
getters/setters
- Add entries for protocols on categories
- Add relation between categories and class they extend
- Add relation between getters/setters and their corresponding property
- Use category name location as the location of category decls/defs if it has one
llvm-svn: 285120
|
|
|
|
|
|
| |
No functional change is intended, just a small refactoring.
llvm-svn: 273647
|
|
|
|
|
|
|
|
| |
ObjCProtocolRef declarations, and fix related crash.
rdar://25035376
llvm-svn: 262985
|
|
|
|
|
|
| |
protocols.
llvm-svn: 262584
|