summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
Commit message (Collapse)AuthorAgeFilesLines
* libclang: remove 'using namespace cxstring'Dmitri Gribenko2013-02-031-1/+0
| | | | llvm-svn: 174285
* Attempt to fix Windows build breakage.Evgeniy Stepanov2013-01-311-1/+2
| | | | llvm-svn: 174060
* libclang: type safety for CXTranslationUnitImpl::CIdxDmitri Gribenko2013-01-261-1/+1
| | | | llvm-svn: 173590
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-1/+1
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-201-2/+0
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
* Re-sort all the headers. Lots of regressions have crept in here.Chandler Carruth2013-01-191-1/+1
| | | | | | | | | | Manually fix the order of UnwrappedLineParser.cpp as that one didn't have its associated header as the first header. This also uncovered a subtle inclusion order dependency as CLog.h didn't include LLVM.h to pick up using declarations it relied upon. llvm-svn: 172892
* [libclang] Enhance logging capabilities of libclang.Argyrios Kyrtzidis2013-01-101-0/+9
| | | | | | | | | -provide a "raw_ostream'ish" class to make it convenient to output logging info. -use macros to automate a bit the logging functionality inside libclang functions -when logging, print a stack trace if "LIBCLANG_LOGGING=2" environment is set. -add logging to more functions. llvm-svn: 172089
* Re-sort #include lines using the llvm/utils/sort_includes.py script.Chandler Carruth2013-01-021-2/+2
| | | | | | | Removes a duplicate #include as well as cleaning up some sort order regressions since I last ran the script over Clang. llvm-svn: 171364
* [libclang] Introduce a new indexing mode where we skip function bodiesArgyrios Kyrtzidis2012-12-061-14/+273
| | | | | | | | | | | | | | | 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-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
OpenPOWER on IntegriCloud