summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexingContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-181-10/+10
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-2/+2
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* Fix CastingDavid Greene2013-01-151-6/+11
| | | | | | Use const_cast<> to avoid a cast-away-const error. llvm-svn: 172565
* libclang: remove a few const_castsDmitri Gribenko2013-01-141-3/+2
| | | | llvm-svn: 172373
* Add a missing 'else'. Found by grep '} if'Dmitri Gribenko2012-12-191-1/+1
| | | | | | | No testcase because this did not affect correctness: a declaration can only be ClassTemplateDecl or a FunctionTemplateDecl, not both. llvm-svn: 170565
* [libclang] Introduce a new indexing mode where we skip function bodiesArgyrios Kyrtzidis2012-12-061-4/+24
| | | | | | | | | | | | | | | that were already parsed in the same "indexing session". An indexing session is defined as using the same CXIndexAction object for multiple clang_indexSourceFile calls. Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will enable the mode where we try to skip bodies that were already parsed in another translation unit. If a function's body was skipped, the "flags" field in the CXIdxDeclInfo structure will have "CXIdxDeclFlag_Skipped" bit was set. llvm-svn: 169539
* Sort #include lines for tools/...Chandler Carruth2012-12-041-3/+2
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* Fix name of this file.Nick Lewycky2012-10-291-1/+1
| | | | llvm-svn: 166913
* [libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis2012-10-181-2/+3
| | | | | | imports. llvm-svn: 166161
* [libclang] Now that we have a CXModule object, pass it to theArgyrios Kyrtzidis2012-10-051-6/+4
| | | | | | importedASTFile indexing callback. llvm-svn: 165281
* [libclang] When indexing, invoke the importedASTFile for PCH files as well.Argyrios Kyrtzidis2012-10-031-0/+15
| | | | llvm-svn: 165161
* [libclang] Simplify indexing of module imports by handling implicitArgyrios Kyrtzidis2012-10-031-9/+10
| | | | | | imports via ImportDecls. llvm-svn: 165160
* [libclang] Implement the importedASTFile indexing callback to provideArgyrios Kyrtzidis2012-10-021-0/+21
| | | | | | info about imported modules. llvm-svn: 165020
* [libclang] Do index 'extern' declarations inside functions.Argyrios Kyrtzidis2012-09-101-1/+21
| | | | | | rdar://12257073 llvm-svn: 163563
* Normalize line endings of r163013 (part 2).Joao Matos2012-08-311-10/+10
| | | | llvm-svn: 163032
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-311-6/+10
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* [libclang] Fix use-after-free bug when handling attributes indexing info.Argyrios Kyrtzidis2012-03-311-27/+19
| | | | | | | | | When indexing a property with a getter/setter with attributes, the allocated memory for AttrListInfo could get released before its destructor is run. Fixes rdar://11113442. llvm-svn: 153792
* [AST] When we @synthesize a property with a user-defined ivar name,Argyrios Kyrtzidis2012-02-281-5/+10
| | | | | | | | | | make sure to record the source location of the ivar name. [libclang] When indexing @synthesized objc methods, report the @implementation as the lexical container. Fixes rdar://10905472 llvm-svn: 151635
* [libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis2012-02-281-2/+20
| | | | | | | | the getter/setter objc method entities that the property is associated with. rdar://10244558 llvm-svn: 151634
* Implement indexing support for lambdas in libclang (both kinds), asDouglas Gregor2012-02-151-1/+3
| | | | | | | well as improving the RecursiveASTVisitor's walk of lambda expressions. llvm-svn: 150549
* [libclang] Indexing: only index implicit template instantiations via an ↵Argyrios Kyrtzidis2012-02-141-11/+11
| | | | | | opt-in indexing option. llvm-svn: 150517
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-131-2/+2
| | | | | | More cleanup after r149799. llvm-svn: 150380
* [libclang] Indexing API: Fully index implict template instantiations.Argyrios Kyrtzidis2012-02-101-2/+27
| | | | llvm-svn: 150267
* [libclang] Indexing: When suppressing references, suppress referencesArgyrios Kyrtzidis2012-02-081-0/+13
| | | | | | of bases in C++ classes. rdar://10768707 llvm-svn: 150048
* [libclang] Do not index implicit C++ member functions. rdar://10769813Argyrios Kyrtzidis2012-02-071-1/+1
| | | | llvm-svn: 150007
* Added location for template keyword in TemplateSpecializationTypeLoc. In the ↵Abramo Bagnara2012-02-061-1/+1
| | | | | | process removed some naming ambiguities. llvm-svn: 149870
* [libclang] For:Argyrios Kyrtzidis2012-01-231-0/+3
| | | | | | | | | @implementation I(cat) suppress subsequent references to 'I'. rdar://10568103 llvm-svn: 148730
* Introduce CXXRecordDecl::isCLike() that is true if the class is C-like,Argyrios Kyrtzidis2012-01-231-5/+2
| | | | | | | | | without C++-specific features. Use it to set the language to C++ when indexing non-C-like structs. rdar://10732579 llvm-svn: 148708
* [libclang] Fix crash when indexing attributes, rdar://10702250.Argyrios Kyrtzidis2012-01-201-1/+1
| | | | llvm-svn: 148524
* [libclang] Make sure Preprocessor is set in ASTUnit during indexing.Argyrios Kyrtzidis2012-01-171-0/+4
| | | | llvm-svn: 148319
* De-virtualize getPreviousDecl() and getMostRecentDecl() when we knowDouglas Gregor2012-01-141-2/+2
| | | | | | | | | | | | we have a redeclarable type, and only use the new virtual versions (getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have that type information. This keeps us from penalizing users with strict type information (and is the moral equivalent of a "final" method). Plus, settle on the names getPreviousDecl() and getMostRecentDecl() throughout. llvm-svn: 148187
* [libclang] If CXIndexOpt_IndexFunctionLocalSymbols is enabled, alsoArgyrios Kyrtzidis2012-01-141-1/+5
| | | | | | index parameters. llvm-svn: 148169
* [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicateArgyrios Kyrtzidis2012-01-141-1/+1
| | | | | | that one wants indexing callbacks for function-local symbols as well. llvm-svn: 148160
* Eliminate ObjCForwardProtocolDecl, which is redundant now thatDouglas Gregor2012-01-011-10/+15
| | | | | | ObjCProtocolDecl modules forward declarations properly. llvm-svn: 147415
* Move the data that corresponds to the definition of a protocol into aDouglas Gregor2012-01-011-3/+8
| | | | | | | | | separately-allocated DefinitionData structure. Introduce various functions that will help with the separation of declarations from definitions (isThisDeclarationADefinition(), hasDefinition(), getDefinition()). llvm-svn: 147408
* Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor2011-12-271-16/+14
| | | | | | | covers both declarations (@class) and definitions (@interface) of an Objective-C class. llvm-svn: 147299
* Move the definition-specific data of ObjCInterfaceDecl into aDouglas Gregor2011-12-151-1/+4
| | | | | | | | | | | | | | | | 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
* [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfoArgyrios Kyrtzidis2011-12-151-16/+57
| | | | | | so that we can access the attributes of an entity for a reference. llvm-svn: 146616
* [libclang] Suppress indexing references for occurrences of the interfaceArgyrios Kyrtzidis2011-12-151-0/+6
| | | | | | in a superclass and the protocols in a protocol list. llvm-svn: 146615
* Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline itsDouglas Gregor2011-12-141-3/+2
| | | | | | | members into ObjCClassDecl, saving ourselves one pointer per forward declaration. llvm-svn: 146564
* [libclang] Indexing API: Provide the protocols list for objc categories as well.Argyrios Kyrtzidis2011-12-131-0/+7
| | | | | | rdar://10573361 llvm-svn: 146498
* [libclang] Indexing API: Fix suppressing of references in macros and suppressArgyrios Kyrtzidis2011-12-131-2/+15
| | | | | | | | @class forward references. rdar://10568080&10568103&10568119 llvm-svn: 146496
* Save category name loc in ObjCCategoryImplDecl, patch by Jason Haslam!Argyrios Kyrtzidis2011-12-091-1/+1
| | | | llvm-svn: 146213
* [libclang] Remove IndexingContext's getScopedContext(), it's not usefulArgyrios Kyrtzidis2011-12-081-22/+0
| | | | | | now that client containers can be set via function calls. llvm-svn: 146117
* [libclang] Indexing API: provide both the semantic and the lexical container.Argyrios Kyrtzidis2011-12-071-5/+7
| | | | | | They are generally the same except in C++ cases like out-of-line member functions. llvm-svn: 146069
* [libclang] Fix indexing of C++ bases in a C++ class.Argyrios Kyrtzidis2011-12-071-4/+35
| | | | llvm-svn: 146068
* [libclang] Introduce CXIdxEntityLanguage that indicates the languageArgyrios Kyrtzidis2011-12-071-18/+54
| | | | | | of an indexed entity. llvm-svn: 146067
* [libclang] Index C++ namespaces.Argyrios Kyrtzidis2011-12-071-0/+7
| | | | llvm-svn: 146019
* [libclang] When indexing a field in a C++ class, return an entityArgyrios Kyrtzidis2011-12-051-1/+6
| | | | | | of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503. llvm-svn: 145859
* Silence GCC warnings, RefCountedBase is meant to be default-initialized here.Benjamin Kramer2011-11-291-1/+0
| | | | llvm-svn: 145396
OpenPOWER on IntegriCloud