summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/c-index-getCursor-pp.c
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] When getting the cursor for an identifier inside a macro ↵Argyrios Kyrtzidis2013-01-071-1/+12
| | | | | | | | | | | | | | | 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
* [libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndefArgyrios Kyrtzidis2012-12-081-0/+9
| | | | | | | | | | directive as a macro expansion. This is more of a "macro reference" than a macro expansion but it's close enough for libclang's purposes. If it causes issues we can revisit and introduce a new kind of cursor. llvm-svn: 169666
* [libclang] Fix getting a cursor inside an angled #include directive.Argyrios Kyrtzidis2012-09-111-0/+4
| | | | | | | | | Fixed by pointing the end location of the preprocessed entity for the #include at the closing '>', instead of the start of '<'. rdar://11113134 llvm-svn: 163588
* [libclang] Fix annotation and getting a "macro expansion" cursorArgyrios Kyrtzidis2011-09-081-0/+4
| | | | | | for a builtin macro expansion. llvm-svn: 139298
* Update all of the libclang code corresponding to the preprocessorChandler Carruth2011-07-141-4/+4
| | | | | | | | | | | | | | MacroInstantiation -> MacroExpansion rename. Internally, everything is switched. Introduce a new cursor kind enum with the new name, but retain the old name as an alias so that we don't break backwards compatibility. Also update the debug printing routine to use 'macro expansions' as its explicitly not guaranteed to be stable, and mechanically switch the test cases over to that. llvm-svn: 135140
* In clang_getCursor(), don't override a preprocessing cursor withinDouglas Gregor2010-12-101-0/+7
| | | | | | another preprocessing cursor, since we want the outermost one. llvm-svn: 121470
* When using a precompiled preamble with detailed preprocessing records,Douglas Gregor2010-11-301-0/+6
| | | | | | | | | | trap the serialized preprocessing records (macro definitions, macro instantiations, macro definitions) from the generation of the precompiled preamble, then replay those when walking the list of preprocessed entities. This eliminates a bug where clang_getCursor() wasn't able to find preprocessed-entity cursors in the preamble. llvm-svn: 120396
* Update clang_getCursor() test to check searches on include directivesDouglas Gregor2010-10-211-5/+9
| | | | llvm-svn: 117063
* Visit preprocessing elements (macro instantiations and macroDouglas Gregor2010-03-191-0/+18
| | | | | | | | definitions) as part of the translation unit, so that normal visitation, token-annotation, and cursor-at retrieval all see preprocessing elements. llvm-svn: 98935
* Revert 98907 since it is breaking buildbots.Bob Wilson2010-03-191-18/+0
| | | | | | | | --- Reverse-merging r98907 into '.': D test/Index/c-index-getCursor-pp.c U tools/CIndex/CIndex.cpp llvm-svn: 98929
* Visit preprocessing elements (macro instantiations and macroDouglas Gregor2010-03-191-0/+18
definitions) as part of the translation unit, so that normal visitation, token-annotation, and cursor-at retrieval all see preprocessing elements. llvm-svn: 98907
OpenPOWER on IntegriCloud