summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Sort #include lines for tools/...Chandler Carruth2012-12-041-10/+9
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* Make DiagnosticOptions intrusively reference-counted, and make sureDouglas Gregor2012-10-231-6/+6
| | | | | | | the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. llvm-svn: 166508
* [libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis2012-10-181-16/+11
| | | | | | imports. llvm-svn: 166161
* Disable the preprocessing record when indexing a source fileArgyrios Kyrtzidis2012-10-101-0/+3
| | | | | | and modules are not enabled. llvm-svn: 165593
* When indexing a module file, for the ppIncludedFile callback giveArgyrios Kyrtzidis2012-10-101-2/+9
| | | | | | | an invalid location if the location points to the synthetic buffer for the module input. llvm-svn: 165592
* [libclang] Don't disable the preprocessing record while indexing so asArgyrios Kyrtzidis2012-10-061-20/+4
| | | | | | | | | | | | to not mess up with module building. It was not worth trying to combine indexing without preprocessing record and building modules with one because: -just importing a module/PCH that was built with a pp record, enables it anyway -the performance gain of indexing without the preprocessing record is insignificant. llvm-svn: 165352
* [libclang] When indexing, invoke the importedASTFile for PCH files as well.Argyrios Kyrtzidis2012-10-031-1/+11
| | | | llvm-svn: 165161
* [libclang] Simplify indexing of module imports by handling implicitArgyrios Kyrtzidis2012-10-031-2/+1
| | | | | | imports via ImportDecls. llvm-svn: 165160
* Some renames to use the 'visitor' nomenclature, no functionality change.Argyrios Kyrtzidis2012-10-031-2/+2
| | | | llvm-svn: 165083
* [libclang] When indexing an AST file, only deserialize the file levelArgyrios Kyrtzidis2012-10-021-23/+9
| | | | | | declarations of the current primary module. llvm-svn: 165046
* [libclang] When indexing an AST file, only deserialize the preprocessing recordArgyrios Kyrtzidis2012-10-021-12/+1
| | | | | | entities of the current primary module. llvm-svn: 165023
* Add info in the preprocessing record whether an inclusion directiveArgyrios Kyrtzidis2012-10-021-1/+2
| | | | | | resulted in an automatic module import. llvm-svn: 165022
* [libclang] Even though we disable the preprocessing record during indexing,Argyrios Kyrtzidis2012-10-021-5/+18
| | | | | | make sure that it gets enabled for when a module needs to be created. llvm-svn: 165021
* [libclang] Implement the importedASTFile indexing callback to provideArgyrios Kyrtzidis2012-10-021-0/+6
| | | | | | info about imported modules. llvm-svn: 165020
* For PPCallbacks::InclusionDirective() add a parameter for the module, wheneverArgyrios Kyrtzidis2012-09-291-1/+2
| | | | | | | an inclusion directive was automatically turned into a module import, and PPCallbacks::moduleImport() for an explicit module import. llvm-svn: 164874
* Per discussion in ↵Argyrios Kyrtzidis2012-09-271-1/+1
| | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120917/064551.html have PPCallbacks::InclusionDirective pass the character range for the filename quotes or brackets. rdar://11113134 & http://llvm.org/PR13880 llvm-svn: 164743
* [libclang] Do a AST concurrency check in clang_indexTranslationUnit_Impl.Argyrios Kyrtzidis2012-09-251-0/+2
| | | | llvm-svn: 164626
* Introduce a flag in SourceManager to treat non-system source filesArgyrios Kyrtzidis2012-07-111-2/+5
| | | | | | | | | | | | | | | | | | | | as "volatile", meaning there's a high enough chance that they may change while we are trying to use them. This flag is only enabled by libclang. Currently "volatile" source files will be stat'ed immediately before opening them, because the file size stat info may not be accurate since when we got it (e.g. from the PCH). This avoids crashes when trying to reference mmap'ed memory from a file whose size is not what we expect. Note that there's still a window for a racing issue to occur but the window for it should be way smaller than before. We can consider later on to avoid mmap completely on such files. rdar://11612916 llvm-svn: 160074
* [libclang] Don't bind a StringRef to a temporary std::string object.Argyrios Kyrtzidis2012-06-281-2/+1
| | | | | | | | It may end up pointing at garbage. Fixes the MSVC debug build. rdar://11703319 llvm-svn: 159377
* [libclang] If displayDiagnostics is set (when calling clang_createIndex), ↵Argyrios Kyrtzidis2012-04-111-2/+6
| | | | | | | | | | | | | make sure to output the errors that occurred even if we did not get an AST (e.g. because the PCH failed to load). Also honor displayDiagnostics in clang_indexSourceFile(). rdar://11203489 llvm-svn: 154472
* [libclang] Rename setBackGroundPriority -> setThreadBackgroundPriority.Argyrios Kyrtzidis2012-03-281-2/+2
| | | | llvm-svn: 153566
* [libclang] Introduce options to control the priority for the threadsArgyrios Kyrtzidis2012-03-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | that libclang creates. -Introduce CXGlobalOptFlags enum for the new options that can be set on the CXIndex object. -CXGlobalOpt_ThreadBackgroundPriorityForIndexing affects: clang_indexSourceFile clang_indexTranslationUnit clang_parseTranslationUnit clang_saveTranslationUnit -CXGlobalOpt_ThreadBackgroundPriorityForEditing affects: clang_reparseTranslationUnit clang_codeCompleteAt clang_annotateTokens rdar://9075282 llvm-svn: 153562
* [libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, whichArgyrios Kyrtzidis2012-03-271-0/+3
| | | | | | | | disables all compiler warnings. rdar://11059556 llvm-svn: 153539
* [PCH] Mark a PCH file with a flag to indicate if the serialized AST hadArgyrios Kyrtzidis2012-03-071-0/+1
| | | | | | | | | | | | | | | | compiler errors or not. -Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time. By default, such a PCH file will be rejected with an error when trying to load it. [libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors occurred. -Have libclang API calls accept a PCH that had compiler errors. The general idea is that we want libclang to stay functional even if a PCH had a compiler error. rdar://10976363. llvm-svn: 152192
* [libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis2012-02-281-0/+12
| | | | | | | | the getter/setter objc method entities that the property is associated with. rdar://10244558 llvm-svn: 151634
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-251-3/+0
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 llvm-svn: 151427
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-201-2/+2
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
* [libclang] Indexing: only index implicit template instantiations via an ↵Argyrios Kyrtzidis2012-02-141-1/+12
| | | | | | opt-in indexing option. llvm-svn: 150517
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-131-6/+6
| | | | | | More cleanup after r149798. llvm-svn: 150379
* [libclang] Indexing API: Fully index implict template instantiations.Argyrios Kyrtzidis2012-02-101-1/+10
| | | | llvm-svn: 150267
* Extract the (InputKind, std::string) pair used to describe inputs toDouglas Gregor2012-01-201-0/+1
| | | | | | | the front end into its own class, FrontendInputFile, to make it easier to introduce new per-input data. No functionality change. llvm-svn: 148546
* [libclang] Make sure Preprocessor is set in ASTUnit during indexing.Argyrios Kyrtzidis2012-01-171-0/+1
| | | | llvm-svn: 148319
* [libclang] Indexing API: Provide the protocols list for objc categories as well.Argyrios Kyrtzidis2011-12-131-0/+3
| | | | | | rdar://10573361 llvm-svn: 146498
* [libclang] Create a diagnostic set to pass at the end of indexing.Argyrios Kyrtzidis2011-12-011-6/+16
| | | | llvm-svn: 145557
* Preserve constness.Benjamin Kramer2011-11-291-4/+4
| | | | llvm-svn: 145397
* [libclang] Fix leak in clang_indexSourceFile_ImplArgyrios Kyrtzidis2011-11-291-1/+2
| | | | llvm-svn: 145393
* [libclang] Indexing API: If the client requested to get a CXTranslationUnit ↵Argyrios Kyrtzidis2011-11-281-4/+30
| | | | | | | | after indexing, honor all the TU options. llvm-svn: 145229
* [libclang] Indexing API: Capture diagnostics during indexing.Argyrios Kyrtzidis2011-11-281-1/+2
| | | | llvm-svn: 145228
* [libclang] Indexing API: Support C++ symbols.Argyrios Kyrtzidis2011-11-221-25/+80
| | | | llvm-svn: 145058
* Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continueArgyrios Kyrtzidis2011-11-181-5/+2
| | | | | | parsing or false to abort parsing. llvm-svn: 144943
* [libclang] Indexing API:Argyrios Kyrtzidis2011-11-181-29/+24
| | | | | | | | | -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
* Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted ↵Ted Kremenek2011-11-171-1/+1
| | | | | | | | | | | | | | | | | object. I discovered that llvm::RefCountedBase<T> has a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted, we can keep it around after the CompilerInvocation object goes away. As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this object may outlive the CompilerInvocation object. This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to mainline LLVM. llvm-svn: 144930
* [libclang] Introduce a new function to apply the indexing callbacks on an ↵Argyrios Kyrtzidis2011-11-151-10/+171
| | | | | | | | existing CXTranslationUnit, mainly to be used for indexing a PCH. llvm-svn: 144623
* [libclang] Slight changes to the indexing API and bigger internal changes ↵Argyrios Kyrtzidis2011-11-141-20/+30
| | | | | | for it. llvm-svn: 144577
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-121-52/+36
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. llvm-svn: 144446
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-111-2/+52
| | | | | | | | 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
* Use LIBCLANG_NOTHREADS instead of CINDEXTEST_NOTHREADS inside libclang,Argyrios Kyrtzidis2011-10-291-1/+1
| | | | | | so the c-index-test one can be enabled without affecting libclang. llvm-svn: 143288
* [libclang] Introduce a new high level API for indexing clients that assumesArgyrios Kyrtzidis2011-10-171-0/+479
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
OpenPOWER on IntegriCloud