summaryrefslogtreecommitdiffstats
path: root/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
* c-index-test: dispose spelling string after use.Benjamin Kramer2012-04-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154738 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the last vestiges of clangIndexDouglas Gregor2012-04-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154675 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a flag to the parser to skip method bodies.Erik Verbruggen2012-04-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154584 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek2012-04-121-2/+8
| | | | | | | | | libclang to accurately get the diagnostic category name from a serialized diagnostic when the version of libclang used to read the diagnostic file is newer than the clang that emitted the diagnostic file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154567 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Apparently it's important to build in C89, sigh..Argyrios Kyrtzidis2012-04-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154525 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce a couple of functions to make it convenientArgyrios Kyrtzidis2012-04-111-0/+16
| | | | | | | | | | | to get at the parameters (and their types) of a function or objc method cursor. int clang_Cursor_getNumArguments(CXCursor C); CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i); rdar://11201527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154523 91177308-0d34-0410-b5e6-96231b3b80d8
* [Cygwin] Work around to flush stdout in a thread, or stdout in threads won't ↵NAKAMURA Takumi2012-04-071-0/+3
| | | | | | be flushed at exit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154254 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused but set variable.Benjamin Kramer2012-03-311-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153800 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.Argyrios Kyrtzidis2012-03-301-0/+2
| | | | | | | | | | After getting a cursor with clang_getCursor for a particular source location, allows querying the cursor in order to find out if the location points to a selector identifier in an objc method or message expression, and which selector index it is. rdar://11158946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153781 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_Cursor_getSpellingNameRange().Argyrios Kyrtzidis2012-03-301-3/+15
| | | | | | | | | | | It retrieves a source range for a piece that forms the cursors spelling name. Most of the times there is only one range for the complete spelling but for objc methods and objc message expressions, there are multiple pieces for each selector identifier. Part of rdar://11113120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153775 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Have c-index-test output more information about a cursor with ↵Argyrios Kyrtzidis2012-03-301-0/+12
| | | | | | | | | | | | -cursor-at: -the location of the cursor -its extent -its spelling Part of radar://11113120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153707 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new libclang API to determine the parent context of a codeDouglas Gregor2012-03-271-1/+16
| | | | | | | | | | completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't include FixIts with a null replacement range. Fixes ↵Ted Kremenek2012-03-201-0/+2
| | | | | | <rdar://problem/11040133>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153122 91177308-0d34-0410-b5e6-96231b3b80d8
* [c-index-test] Make it C90 compliant.Argyrios Kyrtzidis2012-03-151-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152823 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] A couple of enhancements to c-index-test.Argyrios Kyrtzidis2012-03-151-14/+35
| | | | | | | | | -When printing location avoid printing the filename if it is same as the main file, not just if it has '.h' extension. -Make sure we allocate enough bytes for storing as string a huge line number. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152821 91177308-0d34-0410-b5e6-96231b3b80d8
* Update library dependencies to add clangEdit on c-index-test and c-arcmt-test.NAKAMURA Takumi2012-03-111-1/+1
| | | | | | | | | To link with -static -lclang, linker tries to seek not libclang.so, clang.dll nor libclang.dll.a, but libclang.a. USEDLIBS should have correct dependencies for -static. (In contrast, USEDLIBS=libclang.so might be enough w/o -static) FYI, cygwin build (in buildbot) is using -static, due to avoiding weirdness of extremely slower startup lag of clang.exe. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152539 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis2012-02-281-0/+12
| | | | | | | | the getter/setter objc method entities that the property is associated with. rdar://10244558 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151634 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-251-2/+0
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151427 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement new DiagnosticsRenderer that packages notes retrieved by ↵Ted Kremenek2012-02-141-6/+14
| | | | | | | | | clang_getDiagnosticSetFromTU() as child diagnostics of primary diagnostics. By using the DiagnosticRenderer, these Diagnostics now match with those generated for serialized diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150456 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicateArgyrios Kyrtzidis2012-01-141-8/+13
| | | | | | that one wants indexing callbacks for function-local symbols as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148160 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfoArgyrios Kyrtzidis2011-12-151-0/+7
| | | | | | so that we can access the attributes of an entity for a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146616 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: Fix suppressing of references in macros and suppressArgyrios Kyrtzidis2011-12-131-1/+5
| | | | | | | | @class forward references. rdar://10568080&10568103&10568119 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146496 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: provide both the semantic and the lexical container.Argyrios Kyrtzidis2011-12-071-2/+4
| | | | | | They are generally the same except in C++ cases like out-of-line member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146069 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix indexing of C++ bases in a C++ class.Argyrios Kyrtzidis2011-12-071-6/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146068 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce CXIdxEntityLanguage that indicates the languageArgyrios Kyrtzidis2011-12-071-1/+12
| | | | | | of an indexed entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146067 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] When indexing a field in a C++ class, return an entityArgyrios Kyrtzidis2011-12-051-0/+1
| | | | | | of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145859 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Create a diagnostic set to pass at the end of indexing.Argyrios Kyrtzidis2011-12-011-9/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145557 91177308-0d34-0410-b5e6-96231b3b80d8
* Install c-index-test and clang-c/Index.h as internal files. rdar://10217046Bob Wilson2011-11-281-0/+4
| | | | | | | | | Specify that these files should be installed to the optional internal install location as specified by configure's --with-internal-prefix. If that option is not used, they'll be installed to the default prefix as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145235 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: If the client requested to get a CXTranslationUnit ↵Argyrios Kyrtzidis2011-11-281-1/+10
| | | | | | | | after indexing, honor all the TU options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145229 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: Support C++ symbols.Argyrios Kyrtzidis2011-11-221-15/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145058 91177308-0d34-0410-b5e6-96231b3b80d8
* c-index-test.c: Fix syntax according to C.NAKAMURA Takumi2011-11-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144947 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API:Argyrios Kyrtzidis2011-11-181-4/+21
| | | | | | | | | -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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144942 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: fill the objc category info for a category ↵Argyrios Kyrtzidis2011-11-161-1/+4
| | | | | | | | implementation and do not crash if no client container is registered for a declaration context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144765 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only ↵Argyrios Kyrtzidis2011-11-161-2/+9
| | | | | | | | report one reference per file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144763 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce a new function to apply the indexing callbacks on an ↵Argyrios Kyrtzidis2011-11-151-3/+52
| | | | | | | | existing CXTranslationUnit, mainly to be used for indexing a PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144623 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Slight changes to the indexing API and bigger internal changes ↵Argyrios Kyrtzidis2011-11-141-25/+24
| | | | | | for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144577 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Move the check for errors in c-index-test before the TU gets ↵Argyrios Kyrtzidis2011-11-131-3/+5
| | | | | | disposed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144514 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] for c-index-test, check for CINDEXTEST_FAILONERROR when doing ↵Argyrios Kyrtzidis2011-11-131-0/+12
| | | | | | -test-load-source-reparse git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144509 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-121-125/+49
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144446 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence compiler warning.Benjamin Kramer2011-11-111-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144386 91177308-0d34-0410-b5e6-96231b3b80d8
* [serialized diagnostics]: add test cases for serialized diagnostics, ↵Ted Kremenek2011-11-111-3/+7
| | | | | | | | | including a test case for no issues, multiple issues, and a single issue. Along the way, tweak c-index-test -read-diagnostics output so it is easier to tell what diagnostics are child diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144349 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-111-266/+117
| | | | | | | | Cut down the number of callbacks to more generic ones. Clients can check an enum to find out what kind of declaration it is and they can call functions to get more specific information than the generic provided info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144343 91177308-0d34-0410-b5e6-96231b3b80d8
* c-index-test.c: Fix a comment style. /* It is C source. */NAKAMURA Takumi2011-11-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144274 91177308-0d34-0410-b5e6-96231b3b80d8
* c-index-test.c: Fix syntax. It is C source.NAKAMURA Takumi2011-11-101-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144272 91177308-0d34-0410-b5e6-96231b3b80d8
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-101-1/+154
| | | | | | | | via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144269 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] For "c-index-test -index-file", print out the names of the callbacks.Argyrios Kyrtzidis2011-11-051-29/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143779 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add missing return in clang_getExpansionLocation that resulted in ↵Argyrios Kyrtzidis2011-11-031-1/+1
| | | | | | | | | | | that function always returning a null file/line/column. Also add at least one use of clang_getExpansionLocation inside c-index-test that would have made the tests to catch that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143606 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] For c-index-test disable caching of code completion results ifArgyrios Kyrtzidis2011-11-031-0/+2
| | | | | | the CINDEXTEST_COMPLETION_NO_CACHING environment variable is present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143604 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce use of CINDEXTEST_FAILONERROR environment variable ↵Argyrios Kyrtzidis2011-10-281-2/+83
| | | | | | | | which, if set, will cause c-index-test to return as failed if a compiler error occurred. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143243 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Don't use C++-style comments in c-index-test.c.Argyrios Kyrtzidis2011-10-201-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142590 91177308-0d34-0410-b5e6-96231b3b80d8