aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/c-index-test/c-index-test.c
AgeCommit message (Collapse)AuthorFilesLines
2012-07-05Fix some memory leaks found by the static analyzer. Thanks to John Smith for ↵Richard Smith1-3/+8
running it over Clang. llvm-svn: 159732
2012-07-03[libclang] CompilationDatabase naming and comment fixesArnaud A. de Grandmaison1-9/+9
llvm-svn: 159682
2012-07-02[libclang] Introduce clang_Cursor_isDynamicCall which,Argyrios Kyrtzidis1-0/+3
given a cursor pointing to a C++ method call or an ObjC message, returns non-zero if the method/message is "dynamic", meaning: For a C++ method: the call is virtual. For an ObjC message: the receiver is an object instance, not 'super' or a specific class. rdar://11779185 llvm-svn: 159627
2012-07-02Add a new libclang completion API to get brief documentation comment that isDmitri Gribenko1-0/+14
attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). llvm-svn: 159539
2012-06-30c-index-test.c: Fix missing semicolon(s).NAKAMURA Takumi1-2/+2
llvm-svn: 159486
2012-06-30[libclang] add CompilationDatabase supportArnaud A. de Grandmaison1-1/+106
llvm-svn: 159484
2012-06-26Implement a lexer for structured comments.Dmitri Gribenko1-16/+34
llvm-svn: 159223
2012-06-20Structured comment parsing, first step.Dmitri Gribenko1-1/+19
* Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
2012-05-08Introduce a new libclang API to determine the platform availability ofDouglas Gregor1-1/+63
a given entity, so that we can tell when the entity was introduced/deprecated/obsoleted on each platform for which we have an annotation. Addresses <rdar://problem/11365715>. llvm-svn: 156347
2012-04-14c-index-test: dispose spelling string after use.Benjamin Kramer1-0/+1
llvm-svn: 154738
2012-04-12Added a flag to the parser to skip method bodies.Erik Verbruggen1-0/+2
llvm-svn: 154584
2012-04-12Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek1-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. llvm-svn: 154567
2012-04-11[libclang] Apparently it's important to build in C89, sigh..Argyrios Kyrtzidis1-1/+2
llvm-svn: 154525
2012-04-11[libclang] Introduce a couple of functions to make it convenientArgyrios Kyrtzidis1-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 llvm-svn: 154523
2012-04-07[Cygwin] Work around to flush stdout in a thread, or stdout in threads won't ↵NAKAMURA Takumi1-0/+3
be flushed at exit. llvm-svn: 154254
2012-03-31Remove unused but set variable.Benjamin Kramer1-3/+2
llvm-svn: 153800
2012-03-30[libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.Argyrios Kyrtzidis1-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 llvm-svn: 153781
2012-03-30[libclang] Introduce clang_Cursor_getSpellingNameRange().Argyrios Kyrtzidis1-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 llvm-svn: 153775
2012-03-30[libclang] Have c-index-test output more information about a cursor with ↵Argyrios Kyrtzidis1-0/+12
-cursor-at: -the location of the cursor -its extent -its spelling Part of radar://11113120 llvm-svn: 153707
2012-03-27Introduce a new libclang API to determine the parent context of a codeDouglas Gregor1-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>. llvm-svn: 153545
2012-03-20Don't include FixIts with a null replacement range. Fixes ↵Ted Kremenek1-0/+2
<rdar://problem/11040133>. llvm-svn: 153122
2012-03-15[c-index-test] Make it C90 compliant.Argyrios Kyrtzidis1-1/+3
llvm-svn: 152823
2012-03-15[libclang] A couple of enhancements to c-index-test.Argyrios Kyrtzidis1-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. llvm-svn: 152821
2012-02-28[libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis1-0/+12
the getter/setter objc method entities that the property is associated with. rdar://10244558 llvm-svn: 151634
2012-02-25Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis1-2/+0
it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 llvm-svn: 151427
2012-02-14Implement new DiagnosticsRenderer that packages notes retrieved by ↵Ted Kremenek1-6/+14
clang_getDiagnosticSetFromTU() as child diagnostics of primary diagnostics. By using the DiagnosticRenderer, these Diagnostics now match with those generated for serialized diagnostics. llvm-svn: 150456
2012-01-14[libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicateArgyrios Kyrtzidis1-8/+13
that one wants indexing callbacks for function-local symbols as well. llvm-svn: 148160
2011-12-15[libclang] Indexing API: provide an attribute list inside CXIdxEntityInfoArgyrios Kyrtzidis1-0/+7
so that we can access the attributes of an entity for a reference. llvm-svn: 146616
2011-12-13[libclang] Indexing API: Fix suppressing of references in macros and suppressArgyrios Kyrtzidis1-1/+5
@class forward references. rdar://10568080&10568103&10568119 llvm-svn: 146496
2011-12-07[libclang] Indexing API: provide both the semantic and the lexical container.Argyrios Kyrtzidis1-2/+4
They are generally the same except in C++ cases like out-of-line member functions. llvm-svn: 146069
2011-12-07[libclang] Fix indexing of C++ bases in a C++ class.Argyrios Kyrtzidis1-6/+18
llvm-svn: 146068
2011-12-07[libclang] Introduce CXIdxEntityLanguage that indicates the languageArgyrios Kyrtzidis1-1/+12
of an indexed entity. llvm-svn: 146067
2011-12-05[libclang] When indexing a field in a C++ class, return an entityArgyrios Kyrtzidis1-0/+1
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503. llvm-svn: 145859
2011-12-01[libclang] Create a diagnostic set to pass at the end of indexing.Argyrios Kyrtzidis1-9/+15
llvm-svn: 145557
2011-11-28[libclang] Indexing API: If the client requested to get a CXTranslationUnit ↵Argyrios Kyrtzidis1-1/+10
after indexing, honor all the TU options. llvm-svn: 145229
2011-11-22[libclang] Indexing API: Support C++ symbols.Argyrios Kyrtzidis1-15/+58
llvm-svn: 145058
2011-11-18c-index-test.c: Fix syntax according to C.NAKAMURA Takumi1-1/+1
llvm-svn: 144947
2011-11-18[libclang] Indexing API:Argyrios Kyrtzidis1-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. llvm-svn: 144942
2011-11-16[libclang] Indexing API: fill the objc category info for a category ↵Argyrios Kyrtzidis1-1/+4
implementation and do not crash if no client container is registered for a declaration context. llvm-svn: 144765
2011-11-16[libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only ↵Argyrios Kyrtzidis1-2/+9
report one reference per file. llvm-svn: 144763
2011-11-15[libclang] Introduce a new function to apply the indexing callbacks on an ↵Argyrios Kyrtzidis1-3/+52
existing CXTranslationUnit, mainly to be used for indexing a PCH. llvm-svn: 144623
2011-11-14[libclang] Slight changes to the indexing API and bigger internal changes ↵Argyrios Kyrtzidis1-25/+24
for it. llvm-svn: 144577
2011-11-13[libclang] Move the check for errors in c-index-test before the TU gets ↵Argyrios Kyrtzidis1-3/+5
disposed. llvm-svn: 144514
2011-11-13[libclang] for c-index-test, check for CINDEXTEST_FAILONERROR when doing ↵Argyrios Kyrtzidis1-0/+12
-test-load-source-reparse llvm-svn: 144509
2011-11-12[libclang] Further simplify the indexing API.Argyrios Kyrtzidis1-125/+49
That stuff can be added later on if we need them. Also add some const goodness. llvm-svn: 144446
2011-11-11Silence compiler warning.Benjamin Kramer1-0/+1
llvm-svn: 144386
2011-11-11[serialized diagnostics]: add test cases for serialized diagnostics, ↵Ted Kremenek1-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. llvm-svn: 144349
2011-11-11[libclang] Simplify the indexing API.Argyrios Kyrtzidis1-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. llvm-svn: 144343
2011-11-10c-index-test.c: Fix a comment style. /* It is C source. */NAKAMURA Takumi1-1/+1
llvm-svn: 144274
2011-11-10c-index-test.c: Fix syntax. It is C source.NAKAMURA Takumi1-2/+3
llvm-svn: 144272