History log of /external/clang/test/Index/c-index-getCursor-pp.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
664b06f9bd2ea83443ddc8553feba8ba48880752 07-Jan-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When getting the cursor for an identifier inside a macro 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
5f5250b140544436eb3c2fbd9f43e14019ef01f2 08-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Resolve a cursor that points to a macro name inside a #ifdef/#ifndef
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
59cabd7101d3871519019efdff008378a985dae9 11-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix getting a cursor inside an angled #include directive.

Fixed by pointing the end location of the preprocessed entity for the #include
at the closing '>', instead of the start of '<'.

rdar://11113134

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
8f7c540ac42370c40ebcdc4b69018c938faf94ec 08-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix annotation and getting a "macro expansion" cursor
for a builtin macro expansion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
9b2a0ac970a077bdc0bf08c6c682f80ad733c892 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Update all of the libclang code corresponding to the preprocessor
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
85fe1560b061b5f93a52dbd07cddd6e808854710 10-Dec-2010 Douglas Gregor <dgregor@apple.com> In clang_getCursor(), don't override a preprocessing cursor within
another preprocessing cursor, since we want the outermost one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
89d9980bbc2e4a4ac86673e6ec16fb9f5babb63b 30-Nov-2010 Douglas Gregor <dgregor@apple.com> When using a precompiled preamble with detailed preprocessing records,
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
d93fae659ca26558c62dd654e24293be024408af 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Update clang_getCursor() test to check searches on include directives

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
0396f466978d65789eca85b2738e9df53adc78f5 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Visit preprocessing elements (macro instantiations and macro
definitions) as part of the translation unit, so that normal
visitation, token-annotation, and cursor-at retrieval all see
preprocessing elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
3178cb674ac8c3b59e1791e14d38d48619a1b621 19-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert 98907 since it is breaking buildbots.
--- Reverse-merging r98907 into '.':
D test/Index/c-index-getCursor-pp.c
U tools/CIndex/CIndex.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c
2507fa8416c358f372f22ea88734a1bc85d12a4c 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Visit preprocessing elements (macro instantiations and macro
definitions) as part of the translation unit, so that normal
visitation, token-annotation, and cursor-at retrieval all see
preprocessing elements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/c-index-getCursor-pp.c