summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-tokens.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-111-6/+6
| | | | llvm-svn: 320398
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-111-6/+6
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
* Revert r318669/318694Erich Keane2017-11-201-6/+6
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
* [libclang] Fix issue with clang_tokenize and make sure it interprets ↵Argyrios Kyrtzidis2016-11-091-0/+4
| | | | | | | | CXSourceRange as half-open character range. Patch provided by Emilio Cobos Álvarez! (https://reviews.llvm.org/D26446) llvm-svn: 286421
* Make sizeof and alignof a CXCursor_UnaryExprOlivier Goffart2016-06-091-3/+3
| | | | | | | | So we can match sizeof expressions more accurately than with UnexposedExpr Differential Revision: http://reviews.llvm.org/D18081 llvm-svn: 272274
* [libclang] During member ref expression visitation, ignore base anonymous ↵Argyrios Kyrtzidis2015-03-131-1/+16
| | | | | | | | | | struct/union fields. Otherwise they will shadow the real field that that we are interested in. rdar://19783938 llvm-svn: 232141
* [libclang] Fix annotation of a range where the begin or end locationArgyrios Kyrtzidis2013-02-131-0/+64
| | | | | | | | | is inside a macro argument. Previously we would give up and not annotate anything in the range. rdar://11891550 llvm-svn: 175062
* [libclang] Attribute visitation happens out-of-source-order, make sureArgyrios Kyrtzidis2013-02-081-1/+27
| | | | | | | | | we annotate properly when there is an attribute and not skip type specs if the attribute is after the declaration. rdar://13129077 llvm-svn: 174689
* [libclang] Make token annotation of type/storage qualifiers accurate.Argyrios Kyrtzidis2013-01-071-1/+1
| | | | | | | | 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. llvm-svn: 171774
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-051-47/+44
| | | | | | from Manuel Holtgrewe! llvm-svn: 141200
* [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl ofArgyrios Kyrtzidis2011-09-121-3/+3
| | | | | | | a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast, since the implicit cast is the one that is invisible in source code. llvm-svn: 139547
* Use ElaboratedType also for C.Abramo Bagnara2011-03-161-3/+3
| | | | llvm-svn: 127755
* Force CaseStmt to store its child statements in source-code order,Douglas Gregor2011-03-021-3/+43
| | | | | | | which is important for libclang's token-annotation and where's-my-cursor functionality. Fixes <rdar://problem/9004439>. llvm-svn: 126887
* Swap the order of the condition and body of a do-while statement inDouglas Gregor2010-12-171-1/+22
| | | | | | the AST, so that we visit them in source order. Fixes <rdar://problem/8779113>. llvm-svn: 122062
* Teach the libclang cursor visitor to walk into the type informationDouglas Gregor2010-08-101-1/+14
| | | | | | | | provided by __builtin_types_compatible_p and __builtin_va_arg expressions, now that Abramo has added proper type-source information to those expressions. llvm-svn: 110681
* Rework clang_annotateTokens() to annotate tokens with information that more ↵Ted Kremenek2010-05-051-39/+39
| | | | | | | | | closely matches clang_getCursor(). Tokens are now annotated with the cursor (for the matching AST element) that most closely encompasses that token. llvm-svn: 103064
* Robustify SourceManager::getLocation(), so that it returns anDouglas Gregor2010-02-271-1/+2
| | | | | | | | | 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. llvm-svn: 97299
* c-index-test: Unify and always print half-open extents.Daniel Dunbar2010-02-141-51/+52
| | | | llvm-svn: 96160
* Implement clang_annotateTokens(), which associates cursors with eachDouglas Gregor2010-01-261-12/+12
| | | | | | | of the tokens within a raw token stream. This does not even attempt to handle macros yet. llvm-svn: 94561
* Introduce a CIndex API for lexing the raw tokens within a given sourceDouglas Gregor2010-01-261-0/+63
range. The token-annotation function does nothing, yet. llvm-svn: 94551
OpenPOWER on IntegriCloud