Argyrios Kyrtzidis
aee15fb204
[index] When indexing an ObjC method declaration use its base name for the 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
2017-01-26 02:11:50 +00:00
Argyrios Kyrtzidis
2a89c8594d
[index] Introduce symbol subkinds to mark an accessor getter or setter.
...
llvm-svn: 291707
2017-01-11 21:42:48 +00:00
Argyrios Kyrtzidis
38004319fa
[index] Ignore invalid ObjC categories.
...
We currently are unable to get a USR for those and it doesn't seem useful to try to index them.
llvm-svn: 291705
2017-01-11 21:08:31 +00:00
Argyrios Kyrtzidis
de0f50886f
[index] Add 'IBTypeOf' relation for ObjC methods marked with IBAction and properties with IBOutletCollection.
...
llvm-svn: 291703
2017-01-11 21:01:07 +00:00
Argyrios Kyrtzidis
df60aa83a3
[index] Add 'contained-by' relation between references and their lexical container.
...
llvm-svn: 291700
2017-01-11 20:51:10 +00:00
Argyrios Kyrtzidis
e24f5e204b
[index] Introduce SymbolSubKind for reporting language-specific details.
...
Initially reports if a constructor symbol is a copy or move constructor.
llvm-svn: 291409
2017-01-08 23:21:35 +00:00
Argyrios Kyrtzidis
f42032abde
[index] Add SymbolSubKind for the GKInspectable annotation.
...
llvm-svn: 286518
2016-11-10 23:27:11 +00:00
Argyrios Kyrtzidis
f95a000421
[index] Fix issue with protocol name locations in conformance list of an ObjC class when they come from a typedef.
...
The ObjC class protocol list assumes there is an associated location for each protocol but no location is provided
when the protocol list comes from a typedef, and we end up with a buffer overflow when trying to get locations for the protocol names.
Fixes crash of rdar://28980278.
llvm-svn: 286331
2016-11-09 02:47:07 +00:00
Argyrios Kyrtzidis
9d8ab72a69
[index] Handle properly C++14's template variables.
...
- Infer the right symbol kind.
- Provide a templated USR, similar to how we handle class templates.
rdar://28980398
llvm-svn: 286154
2016-11-07 21:20:15 +00:00
Argyrios Kyrtzidis
3e5b61f7da
[index] Make sure to mark class template symbols as having 'generic' sub-kind.
...
llvm-svn: 286153
2016-11-07 21:20:08 +00:00
Argyrios Kyrtzidis
f12918d218
[index] Fix assertion hit when handling a declaration of C++'s 'operator new' function.
...
Part of this is to allow creating a USR for the canonical decl of that which is implicit and does
not have a source location.
rdar://28978992
llvm-svn: 285868
2016-11-02 23:42:33 +00:00
Argyrios Kyrtzidis
67eda2ad1d
[index] Fix repeated visitation of the same InitListExpr for indexing.
...
It was visited multiple times unnecessarily.
rdar://28985038
llvm-svn: 285647
2016-10-31 22:12:12 +00:00
Argyrios Kyrtzidis
806faaf42b
[index] Fixes for locations and relations in Objective C categories and 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
2016-10-25 21:11:22 +00:00
Argyrios Kyrtzidis
f60c395e84
[index] Fix crash with indexing designated init expressions inside templates.
...
rdar://27452869
llvm-svn: 277570
2016-08-03 05:38:53 +00:00
Ben Langmuir
6aed6b4f01
[index] Index system ImportDecls even when there is a DeclarationsOnly filter
...
Whether we call an ImportDecl a decl or a reference symbol role is
somewhat academic, but in practice it's more like a declaration because
it is interesting even to consumers who wouldn't care about references.
Most importantly, we want to report the module dependencies of system
modules even when we have declaration-only filtering.
rdar://problem/27134855
llvm-svn: 275454
2016-07-14 18:51:55 +00:00
Argyrios Kyrtzidis
0642a21f1d
[index] Add SymbolSubKinds for ObjC IB annotations.
...
llvm-svn: 267118
2016-04-22 07:21:16 +00:00
Argyrios Kyrtzidis
f30c8c621f
[index] Add a SymbolSubKind for an ObjC unit test.
...
llvm-svn: 267117
2016-04-22 07:21:10 +00:00
Argyrios Kyrtzidis
66c49f78a3
[index] Fix regression where ObjC method declarations may mistakenly get indexed as definition.
...
rdar://25372906
llvm-svn: 265042
2016-03-31 20:18:22 +00:00
Ben Langmuir
443913f4d6
[index] Remove redundancy between symbol kind and language
...
Condense the ObjCKIND and CXXKIND options into just KIND, since the
language was already specified on a per-symbol basis and this
information was redundant. This only changes the internal
representation; naturally the libclang interface remains the same.
llvm-svn: 264423
2016-03-25 17:01:59 +00:00
Argyrios Kyrtzidis
6377e4e09a
[index] Make sure that declarations of builtin functions are indexed.
...
rdar://25154630
llvm-svn: 263689
2016-03-17 04:28:19 +00:00
Argyrios Kyrtzidis
0ad65ac816
[index] Fix assertion hit when indexing re-declarations of built-in functions.
...
llvm-svn: 262984
2016-03-09 02:12:40 +00:00
Argyrios Kyrtzidis
7332106499
[index] Distinguish USRs of anonymous enums by using their first enumerator.
...
rdar://24609949.
llvm-svn: 262695
2016-03-04 07:17:53 +00:00
Argyrios Kyrtzidis
2682f9e5de
[index] Include parameter types in the USRs for C functions marked with 'overloadable' attribute.
...
llvm-svn: 262694
2016-03-04 07:17:48 +00:00
Argyrios Kyrtzidis
9c99867386
[index] In ObjC++ handle objc type parameters for function USRs.
...
llvm-svn: 262693
2016-03-04 07:17:43 +00:00
Argyrios Kyrtzidis
8757fc5594
[index] Ignore ObjCTypeParamDecls during indexing.
...
llvm-svn: 262686
2016-03-04 04:24:32 +00:00
Argyrios Kyrtzidis
34a0c1a572
[index] Report references of ObjC super class/protocols in interfaces and protocols.
...
llvm-svn: 262584
2016-03-03 05:33:54 +00:00
Argyrios Kyrtzidis
113387e08e
[index] Print and test module import references.
...
llvm-svn: 262208
2016-02-29 07:56:07 +00:00
Argyrios Kyrtzidis
a8b51c1e20
[index] Add a caller relation for a call reference.
...
llvm-svn: 262207
2016-02-29 07:56:00 +00:00
Argyrios Kyrtzidis
c97c7c88c0
[AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called after the statement has been visited.
...
Fixes the indexing client of this.
llvm-svn: 262206
2016-02-29 07:55:55 +00:00
Argyrios Kyrtzidis
d97ec18fe4
[index] Use ',' to separate symbol roles when printing.
...
llvm-svn: 262205
2016-02-29 07:55:51 +00:00
Argyrios Kyrtzidis
d571908445
[AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in printing policy.
...
Enable it for USRs and names when indexing.
Forward references can have different template argument names; including them
makes USRs and names unstable, since the name depends on whether we saw a forward reference or not.
llvm-svn: 260866
2016-02-15 01:32:36 +00:00
Argyrios Kyrtzidis
8756107f93
[test/Index] Set a specific target for the test.
...
llvm-svn: 260861
2016-02-14 22:38:38 +00:00
Argyrios Kyrtzidis
ca741cef3e
[index] Factor libclang's functionality to determing the mangled name of symbols into the clangIndex library.
...
llvm-svn: 260858
2016-02-14 22:30:14 +00:00
Argyrios Kyrtzidis
6fdcb9c590
[index] Enhance c-index-test tool and have it link and test the clangIndex library directly.
...
llvm-svn: 260842
2016-02-14 06:39:11 +00:00