aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-tokens.c
AgeCommit message (Collapse)Author
2013-02-13[libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis
is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175062 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[libclang] Attribute visitation happens out-of-source-order, make sureArgyrios Kyrtzidis
we annotate properly when there is an attribute and not skip type specs if the attribute is after the declaration. rdar://13129077 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174689 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07[libclang] Make token annotation of type/storage qualifiers accurate.Argyrios Kyrtzidis
Previously type/storage qualifiers would not be annotated as the declaration they belonged to. Just use the resulting source range of getRawCursorExtent() which is more correct than what AnnotateTokensWorker::Visit() was adjusting it to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171774 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-05Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor
from Manuel Holtgrewe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12[libclang] For getDeclFromExpr in CIndex.cpp, associate the decl ofArgyrios Kyrtzidis
a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast, since the implicit cast is the one that is invisible in source code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139547 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-16Use ElaboratedType also for C.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02Force CaseStmt to store its child statements in source-code order,Douglas Gregor
which is important for libclang's token-annotation and where's-my-cursor functionality. Fixes <rdar://problem/9004439>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17Swap the order of the condition and body of a do-while statement inDouglas Gregor
the AST, so that we visit them in source order. Fixes <rdar://problem/8779113>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Teach the libclang cursor visitor to walk into the type informationDouglas Gregor
provided by __builtin_types_compatible_p and __builtin_va_arg expressions, now that Abramo has added proper type-source information to those expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05Rework clang_annotateTokens() to annotate tokens with information that more ↵Ted Kremenek
closely matches clang_getCursor(). Tokens are now annotated with the cursor (for the matching AST element) that most closely encompasses that token. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103064 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-27Robustify SourceManager::getLocation(), so that it returns anDouglas Gregor
end-of-line source location when given a column number beyond the length of the line, or an end-of-file source location when given a line number beyond the length of the file. Previously, we would return an invalid location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-14c-index-test: Unify and always print half-open extents.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Implement clang_annotateTokens(), which associates cursors with eachDouglas Gregor
of the tokens within a raw token stream. This does not even attempt to handle macros yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Introduce a CIndex API for lexing the raw tokens within a given sourceDouglas Gregor
range. The token-annotation function does nothing, yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94551 91177308-0d34-0410-b5e6-96231b3b80d8