summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexHigh.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Range-style std::find{,_if} -> llvm::find{,_if}. NFCFangrui Song2019-03-311-4/+2
| | | | llvm-svn: 357359
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-2/+2
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* [libclang] Revert part of r290025, "Remove the 'extern "C"' blocks from the ↵NAKAMURA Takumi2016-12-191-0/+3
| | | | | | | | | | | | | | | | | | | | implementation files." mingw32-ld complains missing symbols in exports, Cannot export clang_findIncludesInFileWithBlock: symbol not defined Cannot export clang_findReferencesInFileWithBlock: symbol not defined Cannot export clang_visitChildrenWithBlock: symbol not defined They are excluded conditionally in header along has_blocks. We should do either; 1. Exclude also function bodies conditionally, and introduce "optional" exporter. 2. Give dummy function bodies for them. 3. Implement functions w/o blocks. llvm-svn: 290113
* [libclang] Remove the 'extern "C"' blocks from the implementation files.Argyrios Kyrtzidis2016-12-171-4/+0
| | | | | | | These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch between declaration and definition then we will get linker errors via libclang.exports. llvm-svn: 290025
* Replace uses of LLVM_FUNCTION_NAME with __func__, this was macro was removed ↵Erik Pilkington2016-10-201-2/+2
| | | | | | from llvm/Support in r284681 llvm-svn: 284690
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-5/+5
| | | | llvm-svn: 210422
* Fix a typo in the function name that I just introduced (r201155)Dmitri Gribenko2014-02-111-1/+1
| | | | llvm-svn: 201156
* libclang: audit all APIs that accept a CXTranslationUnit to make sure thatDmitri Gribenko2014-02-111-5/+4
| | | | | | | checks for invalid translation unit are in place. Also, while there, add log output for this case. llvm-svn: 201155
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-041-1/+1
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* [libclang] Change clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis2013-03-081-25/+25
| | | | | | | | return an enum, as suggested by Jordan. llvm-svn: 176732
* [libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to ↵Argyrios Kyrtzidis2013-03-081-44/+48
| | | | | | | | | | | return a value. Possible values are: 1 : if a parameter was invalid -1 : if the callback returned CXVisit_Break, otherwise returns 0. llvm-svn: 176716
* [libclang] Introduce clang_findIncludesInFile, that can be used to retrieve ↵Argyrios Kyrtzidis2013-03-081-0/+106
| | | | | | | | | all #import/#include directives in a specific file. It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for all the include directives in a particular file. llvm-svn: 176682
* [libclang] When calling the function of CXCursorAndRangeVisitor, don't forget toArgyrios Kyrtzidis2013-03-081-4/+6
| | | | | | stop visitation if it returns CXVisit_Break. llvm-svn: 176681
* [libclang] Add Logger::operator<< overloads for CXCursor and FileEntry.Argyrios Kyrtzidis2013-03-081-0/+3
| | | | llvm-svn: 176680
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-4/+3
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* libclang: change return type of getCursorDecl() to 'const Decl *'Dmitri Gribenko2013-01-231-13/+14
| | | | llvm-svn: 173278
* 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
* Replace more usages of __func__ with LLVM_FUNCTION_NAMEDmitri Gribenko2013-01-111-1/+2
| | | | llvm-svn: 172161
* [libclang] Enhance logging capabilities of libclang.Argyrios Kyrtzidis2013-01-101-12/+13
| | | | | | | | | -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
* [libclang] When getting the cursor for an identifier inside a macro ↵Argyrios Kyrtzidis2013-01-071-2/+2
| | | | | | | | | | | | | | | definition, check if this was ever a macro name and return a specific CXCursor_MacroExpansion cursor in such a case, instead of the generic CXCursor_MacroDefinition. Checking for macro name makes sure the identifier is not part of the identifier list in a function macro. While, in general, resolving identifiers in macro definitions to other macros may not be completely accurate, it greatly improves functionality such as give-me-the-definition-of-this, which was not working at all inside macro definitions. llvm-svn: 171773
* Sort #include lines for tools/...Chandler Carruth2012-12-041-2/+1
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* [libclang] Add defensive checks to make sure we don't try to dereferenceArgyrios Kyrtzidis2011-12-101-0/+5
| | | | | | a null pointer after getCursorDecl() is called. rdar://10298421. llvm-svn: 146312
* [libclang] Make sure we don't try to handle a CXCursor_NoDeclFoundArgyrios Kyrtzidis2011-12-091-0/+5
| | | | | | passed to clang_findReferencesInFile. llvm-svn: 146211
* [libclang] When doing clang_findReferencesInFile, make sure we don't crashArgyrios Kyrtzidis2011-12-081-3/+15
| | | | | | | | if we come up against a null Decl. No test case unfortunately. rdar://10457799. llvm-svn: 146127
* [libclang] Do the ConcurrencyCheck at the beginning of ↵Argyrios Kyrtzidis2011-11-291-3/+6
| | | | | | clang_findReferencesInFile. llvm-svn: 145455
* [libclang] Make clang_findReferencesInFile also work on macros (find all ↵Argyrios Kyrtzidis2011-11-291-4/+108
| | | | | | | | | | | | | expansions/definition of a macro in a file). As a bonus, also make searching for declarations more efficient by ignoring preprocessing entities when we know that we are looking for a declaration. Fixes rdar://10427411. llvm-svn: 145369
* [libclang] Make clang_findReferencesInFile use "file-targeted" ↵Argyrios Kyrtzidis2011-11-161-30/+9
| | | | | | | | deserialization and avoid unnecessary deserializations. llvm-svn: 144791
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-061-0/+315
and a callback and finds all identifier references of the cursor in the file. rdar://7948304 llvm-svn: 141277
OpenPOWER on IntegriCloud