Douglas Gregor
c0ac7d688e
Move the definition-specific data of ObjCInterfaceDecl into a
...
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.
Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.
llvm-svn: 146644
2011-12-15 05:27:12 +00:00
Argyrios Kyrtzidis
4d873b725e
[libclang] Indexing API: provide an attribute list inside CXIdxEntityInfo
...
so that we can access the attributes of an entity for a reference.
llvm-svn: 146616
2011-12-15 00:05:00 +00:00
Argyrios Kyrtzidis
41cfce25fe
[libclang] Suppress indexing references for occurrences of the interface
...
in a superclass and the protocols in a protocol list.
llvm-svn: 146615
2011-12-15 00:04:56 +00:00
Douglas Gregor
40d009ff0c
Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
...
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.
llvm-svn: 146564
2011-12-14 17:12:03 +00:00
Argyrios Kyrtzidis
9b9f7a9f7a
[libclang] Indexing API: Provide the protocols list for objc categories as well.
...
rdar://10573361
llvm-svn: 146498
2011-12-13 18:47:45 +00:00
Argyrios Kyrtzidis
ccdf8276a3
[libclang] Indexing API: Fix suppressing of references in macros and suppress
...
@class forward references.
rdar://10568080&10568103&10568119
llvm-svn: 146496
2011-12-13 18:47:35 +00:00
Argyrios Kyrtzidis
4996f5fba2
Save category name loc in ObjCCategoryImplDecl, patch by Jason Haslam!
...
llvm-svn: 146213
2011-12-09 00:31:40 +00:00
Argyrios Kyrtzidis
bf1d884d9e
[libclang] Remove IndexingContext's getScopedContext(), it's not useful
...
now that client containers can be set via function calls.
llvm-svn: 146117
2011-12-08 00:54:07 +00:00
Argyrios Kyrtzidis
663c8ecda1
[libclang] Indexing API: provide both the semantic and the lexical container.
...
They are generally the same except in C++ cases like out-of-line member functions.
llvm-svn: 146069
2011-12-07 20:44:19 +00:00
Argyrios Kyrtzidis
b3c16bad20
[libclang] Fix indexing of C++ bases in a C++ class.
...
llvm-svn: 146068
2011-12-07 20:44:15 +00:00
Argyrios Kyrtzidis
520028802c
[libclang] Introduce CXIdxEntityLanguage that indicates the language
...
of an indexed entity.
llvm-svn: 146067
2011-12-07 20:44:12 +00:00
Argyrios Kyrtzidis
2b0b43cf56
[libclang] Index C++ namespaces.
...
llvm-svn: 146019
2011-12-07 05:52:06 +00:00
Argyrios Kyrtzidis
1a10f29b2f
[libclang] When indexing a field in a C++ class, return an entity
...
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503.
llvm-svn: 145859
2011-12-05 22:05:28 +00:00
Benjamin Kramer
696894a35b
Silence GCC warnings, RefCountedBase is meant to be default-initialized here.
...
llvm-svn: 145396
2011-11-29 11:31:35 +00:00
Argyrios Kyrtzidis
41fc05cad8
[libclang] Indexing API: Fix issues, mostly C++ related.
...
llvm-svn: 145107
2011-11-23 20:27:26 +00:00
Argyrios Kyrtzidis
4c910b1475
[libclang] Indexing API: Support C++ symbols.
...
llvm-svn: 145058
2011-11-22 07:24:51 +00:00
Argyrios Kyrtzidis
effdbf55ac
[libclang] Indexing API:
...
-For indexDeclaration, also pass the declaration attributes as an array of cursors.
-Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass
a reference if a declaration/definition does not exist in the file.
-Other fixes.
llvm-svn: 144942
2011-11-18 00:26:51 +00:00
Argyrios Kyrtzidis
1cff795e51
[libclang] Indexing API: make sure we don't pass declarations/references without USR or location.
...
llvm-svn: 144941
2011-11-18 00:26:46 +00:00
Argyrios Kyrtzidis
df15c20979
[libclang] Indexing API: fill the objc category info for a category implementation and
...
do not crash if no client container is registered for a declaration context.
llvm-svn: 144765
2011-11-16 02:35:05 +00:00
Argyrios Kyrtzidis
d7b8790003
[libclang] Indexing API: make sure we do not try to index local declarations.
...
llvm-svn: 144764
2011-11-16 02:35:01 +00:00
Argyrios Kyrtzidis
e4acd23f0b
[libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only report one reference
...
per file.
llvm-svn: 144763
2011-11-16 02:34:59 +00:00
Argyrios Kyrtzidis
233f12d9e2
[libclang] Indexing API: Pass an implicit ObjCInterfaceDecl (@implementation without @interface)
...
in a separate indexing callback than its implementation.
llvm-svn: 144625
2011-11-15 06:20:24 +00:00
Argyrios Kyrtzidis
d992e14394
[libclang] Introduce a new function to apply the indexing callbacks on an existing
...
CXTranslationUnit, mainly to be used for indexing a PCH.
llvm-svn: 144623
2011-11-15 06:20:16 +00:00
Argyrios Kyrtzidis
86acd72bd2
[libclang] Slight changes to the indexing API and bigger internal changes for it.
...
llvm-svn: 144577
2011-11-14 22:39:19 +00:00
Argyrios Kyrtzidis
3e429e7cc4
[libclang] Further simplify the indexing API.
...
That stuff can be added later on if we need them.
Also add some const goodness.
llvm-svn: 144446
2011-11-12 02:16:30 +00:00
Argyrios Kyrtzidis
7519c5e440
[libclang] Simplify the indexing API.
...
Cut down the number of callbacks to more generic ones. Clients can check
an enum to find out what kind of declaration it is and they can call functions
to get more specific information than the generic provided info.
llvm-svn: 144343
2011-11-11 00:23:36 +00:00
Benjamin Kramer
f1b4e0052f
Use const_cast to make it obvious that it's just removing constness (and silence warnings).
...
llvm-svn: 143193
2011-10-28 13:37:11 +00:00
Argyrios Kyrtzidis
0c7735e525
[libclang] Index implicit property references.
...
llvm-svn: 142355
2011-10-18 15:50:50 +00:00
Matt Beaumont-Gay
cb6e5c16ef
Silence a -Wc++0x-narrowing warning
...
llvm-svn: 142292
2011-10-17 22:19:09 +00:00
Argyrios Kyrtzidis
dc199a3152
[libclang] Introduce a new high level API for indexing clients that assumes
...
more of the work involved in indexing a translation unit and simplifies client
implementations.
Only C/ObjC for now, C++ (and comments) to come.
llvm-svn: 142233
2011-10-17 19:48:19 +00:00