summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXCursor.h
Commit message (Collapse)AuthorAgeFilesLines
* Removed PointerUnion3 and PointerUnion4 aliases in favor of the variadic ↵Dmitri Gribenko2020-01-141-3/+3
| | | | template
* 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
* [libclang] Unify getCursorDecl and getCursorParentDeclFangrui Song2018-11-201-9/+8
| | | | | | They do the same thing, thus the latter (which has only 2 call sites) can be deleted. llvm-svn: 347293
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-091-40/+40
| | | | | | | | | | | | | | | | | | | 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
* Fix typos in clangAlexander Kornienko2018-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").Alexander Kornienko2015-06-221-2/+1
| | | | llvm-svn: 240353
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-221-1/+2
| | | | | | | | | | | | The patch is generated using this command: $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ work/llvm/tools/clang To reduce churn, not touching namespaces spanning less than 10 lines. llvm-svn: 240270
* Rename MacroDefinition -> MacroDefinitionRecord, ↵Richard Smith2015-05-041-12/+9
| | | | | | | | | | Preprocessor::MacroDefinition -> MacroDefinition. clang::MacroDefinition now models the currently-defined value of a macro. The previous MacroDefinition type, which represented a record of a macro definition directive for a detailed preprocessing record, is now called MacroDefinitionRecord. llvm-svn: 236400
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-2/+2
| | | | llvm-svn: 210422
* libclang: make getCursorParentDecl() return 'const Decl *'Dmitri Gribenko2013-01-261-1/+1
| | | | llvm-svn: 173584
* libclang: change getCursorAttr() to return 'const Attr *'Dmitri Gribenko2013-01-261-1/+1
| | | | llvm-svn: 173583
* libclang: make getCursorStmt() and getCursorExpr() return const pointersDmitri Gribenko2013-01-261-2/+2
| | | | | | Also change EnqueueVisitor to use ConstStmtVisitor as a consequence. llvm-svn: 173577
* libclang: change return type of getCursorDecl() to 'const Decl *'Dmitri Gribenko2013-01-231-4/+5
| | | | llvm-svn: 173278
* libclang: remove a few const_castsDmitri Gribenko2013-01-141-2/+2
| | | | llvm-svn: 172373
* libclang: change CXCursor to store 'const void *' pointers forDmitri Gribenko2013-01-111-20/+22
| | | | | | const-correctness, and update all users llvm-svn: 172252
* [libclang] When getting the cursor for an identifier inside a macro ↵Argyrios Kyrtzidis2013-01-071-3/+46
| | | | | | | | | | | | | | | 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
* Reduce malloc() traffic of clang_getOverridenCursors() by using a pool of ↵Ted Kremenek2012-04-301-2/+9
| | | | | | | | | | SmallVector<CXCursor> objects under the covers. Fixes <rdar://problem/11289160>. llvm-svn: 155841
* Implement indexing support for lambdas in libclang (both kinds), asDouglas Gregor2012-02-151-0/+9
| | | | | | | well as improving the RecursiveASTVisitor's walk of lambda expressions. llvm-svn: 150549
* [libclang] Indexing API: Support C++ symbols.Argyrios Kyrtzidis2011-11-221-1/+1
| | | | llvm-svn: 145058
* [libclang] Indexing API:Argyrios Kyrtzidis2011-11-181-3/+3
| | | | | | | | | -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
* [libclang] Introduce a new high level API for indexing clients that assumesArgyrios Kyrtzidis2011-10-171-4/+6
| | | | | | | | | 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
* [libclang] Allow using getDeclCursorUSR function with a Decl* and not a cursor.Argyrios Kyrtzidis2011-10-121-0/+5
| | | | llvm-svn: 141770
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-061-1/+24
| | | | | | | | and a callback and finds all identifier references of the cursor in the file. rdar://7948304 llvm-svn: 141277
* [libclang] Move the bulk of clang_getOverriddenCursors intoArgyrios Kyrtzidis2011-10-061-1/+4
| | | | | | | a cxcursor::getOverriddenCursors C++ function, because SmallVectors are groovier that malloc'ing buffers. llvm-svn: 141276
* [libclang] Refactor the important stuff in clang_getCursor into a ↵Argyrios Kyrtzidis2011-09-271-0/+2
| | | | | | cxcursor::getCursor(CXTranslationUnit, SourceLocation) function. llvm-svn: 140588
* Move the rest of the preprocessor terminology from 'instantiate' andChandler Carruth2011-07-141-6/+6
| | | | | | | | | | | | | variants to 'expand'. This changed a couple of public APIs, including one public type "MacroInstantiation" which is now "MacroExpansion". The rest of the codebase was updated to reflect this, especially the libclang code. Two of the C++ (and thus easily changed) libclang APIs were updated as well because they pertained directly to the old MacroInstantiation class. No functionality changed. llvm-svn: 135139
* [libclang] Introduce cxcursor::getCursorParentDecl(CXCursor Cursor) and use ↵Argyrios Kyrtzidis2011-06-291-0/+1
| | | | | | | | it at the appropriate place in CIndex.cpp No functionality change. llvm-svn: 134104
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-19/+30
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Encapsulate within CXCursor the notion of whether a VarDecl* is the first ↵Ted Kremenek2010-11-011-1/+6
| | | | | | | | | | | | Decl in a DeclGroup. We use this to recover some context that is currently not modeled directly in the AST. Currently VarDecl's cannot properly determine their source range because they have no context on whether or not they appear in a DeclGroup. For the meantime, this bandaid suffices in libclang since that is where the correct SourceRange is directly needed. Fixes <rdar://problem/8595749>. llvm-svn: 117973
* Extend the preprocessing record and libclang with support forDouglas Gregor2010-10-201-0/+8
| | | | | | | | | inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. llvm-svn: 116952
* Introduce a new kind of cursor into libclang, which covers a referenceDouglas Gregor2010-09-131-1/+26
| | | | | | | | | to an "overloaded" set of declarations. This cursor kind works for unresolved references to functions/templates (e.g., a call within a template), using declarations, and Objective-C class and protocol forward declarations. llvm-svn: 113805
* Add libclang support for label statements, gotos, and taking theDouglas Gregor2010-09-101-0/+8
| | | | | | address of a label (GNU extension). llvm-svn: 113564
* Teach libclang to walk the base and member initializers of aDouglas Gregor2010-09-091-0/+9
| | | | | | | | constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. llvm-svn: 113545
* Add libclang support for namespace aliases (visitation + USRs) alongDouglas Gregor2010-08-311-1/+9
| | | | | | | | | | | with a new cursor kind for a reference to a namespace. There's still some oddities in the source location information for NamespaceAliasDecl that I'll address with a separate commit, so the source locations displayed in the load-namespaces.cpp test will change. llvm-svn: 112676
* Extend libclang with a new cursor kind that indicates a reference to aDouglas Gregor2010-08-311-1/+10
| | | | | | | | | template. Such cursors occur, for example, in template specialization types such as vector<int>. Note that we do not handle the super-interesting case where the template name is unresolved, e.g., within a template. llvm-svn: 112636
* Implement CXCursor support for walking C++ base specifiers. This includes ↵Ted Kremenek2010-08-271-0/+7
| | | | | | | | adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier. Implements <rdar://problem/8274883>. llvm-svn: 112296
* Add libclang API hook "clang_getIBOutletCollectionType" to query the ↵Ted Kremenek2010-08-261-0/+2
| | | | | | collection type for iboutletcollection attributes. llvm-svn: 112139
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-0/+112
(C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
OpenPOWER on IntegriCloud