History log of /external/clang/tools/c-index-test/c-index-test.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
10f900447e41a1a1a1877b886553da4a0dff3ad6 22-Jul-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Revert commit 186833 (no longer needed after the fix in 186859).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
212e3d792e20aaaaef41d4466a52827993b2bfa9 22-Jul-2013 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Let this C89-compliant since r186817.

warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
514afc7255a2aaa88498b3374c944a2c497c1c55 05-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declaration was affected by "@optional"

rdar://14348525.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c965f76e02d536d875b1e9e3ea96f39452c6bfa2 17-May-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: add a function to check whether a member function is pure virtual

Patch by Seth Fowler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e858e667c14ce4a9df5a4bbae770a0a3a3c8723e 27-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.

rdar://13743084

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
65110caf70bc6c07c3bc223acf03643af47a6643 26-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.

The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
80e1acaeb7040548cb494e609b120b134e22a193 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.

rdar://13667150

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
38dbad233bfc7906e38e028707ffe5925b9ca46c 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
parameter types in an ObjC method declarations.

rdar://13676977

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9ee6a66d19aacc35397bbdc4fd535e3944301856 19-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.

rdar://13684512

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
04b6748ee90649069ee79464317ae6cd6aca317d 11-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.

Suggested by Stefan Seefeld.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
411d33aa0b0d3bc9b2faec40cd821bdd836094ab 11-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Expose record layout info via new libclang functions:

clang_Type_getAlignOf
clang_Type_getSizeOf
clang_Type_getOffsetOf
clang_Cursor_isBitField

Patch by Loïc Jaquemet!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
cd6dcb3434d77b1f652416f2b5c3c62394f1472c 09-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [c-index-test] Enable 'display diagnostics' when using the -test-load functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c1d22393628a145e54396c0ac66e9625d13a7658 13-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Modules] Resolve top-headers of modules lazily.

This allows resolving top-header filenames of modules to FileEntries when
we need them, not eagerly.

Note that that this breaks ABI for libclang functions
clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders
but this is fine because they are experimental and not widely used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
5256c1fd315104f7b1542bb231f16dbad8a8d64b 11-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix a test and a warning on windows.

Patch by Guy Benyei!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ee2d5fd7a3bd42bce387db094d27a479617c3e67 08-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.

It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for
all the include directives in a particular file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
fc09336a5965040736f9bc63a70416003972364e 01-Mar-2013 Stefanus Du Toit <stefanus.dutoit@rapidmind.com> Fix typos: [Dd]iagnosic -> [Dd]iagnostic

These all appear in comments or (ironically) diagnostics output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ae03d8e52d81adbb98b31dd5c179abe45c91fc25 15-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> libclang: add clang_getTypeSpelling(CXType CT)

Adds a function clang_getTypeSpelling(CXType CT) that returns
a CXString containing the underlying type.

Patch by Ben Gertzfield.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2bff7e5a02495dabd26013c15613f082fce67633 17-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [c-index-test] Fix warnings about unused results from chdir().
Patch from Edwin Vane!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
838eb7e8652e451d93494a4e583e4d11809bcb4a 06-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new indexing mode where we skip function bodies
that were already parsed in the same "indexing session".

An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.

If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d10682f7d2944cafb4bc6555df5ab66cd24f8cd8 05-Dec-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [c-index-test] Introduce '-index-compile-db' which accepts a compilation database file
and does an '-index-file' for all compile commands in the database.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
02c1b863440b067f3d674bde237146ef54c17875 04-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Make C89-compliant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1eb60825f0b858a4568c1a9497cc61b0d90c9b3a 04-Dec-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang: Add a function to libclang for retrieving the bit width value

Patch by Jyun-Yan You.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e4a990f34904eb572c8d6aa1deef19465214359c 01-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression.

rdar://12578643

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3584972866f39d42aa4029586278022d89451bd9 25-Oct-2012 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Split a format string. [-Woverlength-strings]

FIXME: They are still long strings without formatter in printf(3)!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
11db1824673fb9834fc414a46fb8da89221c8be3 24-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add "-index-file-full" option that recursively indexes any imported
modules/PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8d7a24e94b58676e57fd3f47353cbdbc59917d81 18-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3c5527e939c454bfd3e16354908e0c4315be5d2f 12-Oct-2012 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: /* Use C style comment. */

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0ef983e89c989ce27ab35d292893a915c8ee398d 11-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure the index_data.main_filename field is initialized
in c-index-test. index_enteredMainFile is not invoked when indexing a
module file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8003fd613724847bba834ae41aca6f446af1f818 11-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add tests for indexing modules and PCHs using modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
900ab95e12bb7483971640a91075699eec391804 11-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Improve AST serialization done by ASTUnit::Save().

The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
134d1e8a0b463d929ffeac5eefeae761707bf5d3 05-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Now that we have a CXModule object, pass it to the
importedASTFile indexing callback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
5d04b1af7b76ed536557d4bba24005ad0d2fd608 05-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce new C functions that provide information about modules:

clang_Cursor_getModule
clang_Module_getParent
clang_Module_getName
clang_Module_getFullName
clang_Module_getNumTopLevelHeaders
clang_Module_getTopLevelHeader

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
37f2f52fbc16b0d426d4d86c7e1662e5c6b9e3b8 03-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Simplify indexing of module imports by handling implicit
imports via ImportDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3fe97781ad5f31dbfd9348c9488b93a7c01d7818 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Even though we disable the preprocessing record during indexing,
make sure that it gets enabled for when a module needs to be created.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2c3e05c266de0d4c465b58ffd129bd0b31604368 02-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Implement the importedASTFile indexing callback to provide
info about imported modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e4330a302ac20b41b9800267ebd4b5b01f8553f8 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.

Now we have a list of all commands. This is a good thing in itself, but it
also enables us to easily implement typo correction for command names.

With this change we have objects that contain information about each command,
so it makes sense to resolve command name just once during lexing (currently we
store command names as strings and do a linear search every time some property
value is needed). Thus comment token and AST nodes were changed to contain a
command ID -- index into a tables of builtin and registered commands. Unknown
commands are registered during parsing and thus are also uniformly assigned an
ID. Using an ID instead of a StringRef is also a nice memory optimization
since ID is a small integer that fits into a common bitfield in Comment class.

This change implies that to get any information about a command (even a command
name) we need a CommandTraits object to resolve the command ID to CommandInfo*.
Currently a fresh temporary CommandTraits object is created whenever it is
needed since it does not have any state. But with this change it has state --
new commands can be registered, so a CommandTraits object was added to
ASTContext.

Also, in libclang CXComment has to be expanded to include a CXTranslationUnit
so that all functions working on comment AST nodes can get a CommandTraits
object. This breaks binary compatibility of CXComment APIs.

Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't
need TU parameter anymore, so it was removed. This is a source-incompatible
change for this C API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
35adca009c65a9578b91ab0bdca13691624e13af 31-Aug-2012 David Blaikie <dblaikie@gmail.com> Fix the build (-Wswitch violation introduced by r163013).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
642214936430d2258318f2022184c1709dfa16d3 30-Aug-2012 Michael Liao <michael.liao@intel.com> Fix C++ comment in C source



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b3dd988abdd8d048ac999a5713239c95692e528c 23-Aug-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] c-index-test: Make the printing of the overrides list of a cursor in
a deterministic order, to avoid random test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d1a4f68a4301d1ee3098cc9db0cd507b96dd1bee 10-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix a couple of pedantic gcc warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f303d4cb10648ac9c2080ae7c9dd507ba615e3a7 07-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> libclang API for comment-to-xml conversion.

The implementation also includes a Relax NG schema and tests for the schema
itself. The schema is used in c-index-test to verify that XML documents we
produce are valid. In order to do the validation, we add an optional libxml2
dependency for c-index-test.

Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric
Christopher. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
96b098674908eaa59a9128f3305cda6fbbdad563 01-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: add support for \tparam command on all levels.

The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this
breaks libclang binary compatibility, but should not be a problem since API is
so new.

This also fixes PR13372 as a side-effect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
74edbd4edf9d25ea5ae0413cc16c5c4e16ad5262 30-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> c-index-test: remove dead store. Found by Clang static analyzer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2d66a5016d4aacce362f89290261c8a1a6eef0d3 23-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Comment AST: add InlineContentComment::RenderKind to specify a default
rendering mode for clients that don't want to interpret Doxygen commands.

Also add a libclang API to query this information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
5ef6ea5c69336ea668cd0ff2a2d824f6ce988e1a 21-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix c-index-test to compile as C89.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ae99b75fbbac1deaccdcc1b326b8fb6b07a1e72d 20-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add libclang APIs to walk comments ASTs and an API to convert a comment to an
HTML fragment.

For testing, c-index-test now has even more output:
* HTML rendering of a comment
* comment AST tree dump in S-expressions like Comment::dump(), but implemented
* with libclang APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e07c5f897e8da88959c93a9d98f1b441da649eb6 05-Jul-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix some memory leaks found by the static analyzer. Thanks to John Smith for running it over Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c70851b74c06b27df07b9a772656a2e663d432ee 03-Jul-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] CompilationDatabase naming and comment fixes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f39a7aea7dd0bf0716a066e2db2f97ea8730e4fa 03-Jul-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_isDynamicCall which,
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d99ef536b241071b6f4c01db6525dc03242ac30b 02-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add a new libclang completion API to get brief documentation comment that is
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).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0fb474a9323525964d437fefa22c06172492d270 30-Jun-2012 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Fix missing semicolon(s).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
db29318326aba9e0c5c1bbba093687dccc38fc39 30-Jun-2012 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> [libclang] add CompilationDatabase support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2d44d77fed3200e2eff289f55493317e90d3398c 26-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement a lexer for structured comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
aa0cd85838f2a024e589ea4e8c2094130065af21 20-Jun-2012 Dmitri Gribenko <gribozavr@gmail.com> Structured comment parsing, first step.

* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
cc889664dec7776ebb598e4584e7df5ba2f59ab4 08-May-2012 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API to determine the platform availability of
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>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
342742adb69af8ef8f2c652f162496b98c45bc20 14-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> c-index-test: dispose spelling string after use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6a91d385618ea4d28236c496f540a26877c95525 12-Apr-2012 Erik Verbruggen <erikjv@me.com> Added a flag to the parser to skip method bodies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
78d5d3bb9386a5aa31d19445eb8f81bf2652acb4 12-Apr-2012 Ted Kremenek <kremenek@apple.com> Implement clang_getDiagnosticCategoryText() to provide a way for a client of 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
/external/clang/tools/c-index-test/c-index-test.c
47f1165c92bc4104e314223ed9ad251e914687c1 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Apparently it's important to build in C89, sigh..

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d98ef9ae48ab4090d4d5d703ce65cfac62807fda 11-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a couple of functions to make it convenient
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
/external/clang/tools/c-index-test/c-index-test.c
3be55cdbb5fda326dc55eb01c92d6645a2304309 07-Apr-2012 NAKAMURA Takumi <geek4civic@gmail.com> [Cygwin] Work around to flush stdout in a thread, or stdout in threads won't be flushed at exit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6c235bc9e126fcecd16257838aa040fc9c363328 31-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused but set variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
34ebe1e1b0779bcea2f277bc6b4e9dd98bf70b7b 31-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.

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
/external/clang/tools/c-index-test/c-index-test.c
ba1da14e79c1ecd49306e5175b69baa1e7ed4293 30-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_Cursor_getSpellingNameRange().

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
/external/clang/tools/c-index-test/c-index-test.c
66373dd2d508407ed5894ad65f654eea8d892319 30-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Have c-index-test output more information about a cursor with -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
/external/clang/tools/c-index-test/c-index-test.c
ba1030698dbc276db86b11c5329a1edee8a1805e 28-Mar-2012 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API to determine the parent context of a code
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
/external/clang/tools/c-index-test/c-index-test.c
3739b32a01b9778176757425e62252c288b85383 20-Mar-2012 Ted Kremenek <kremenek@apple.com> Don't include FixIts with a null replacement range. Fixes <rdar://problem/11040133>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
62d7fea624f466d11001b2dc733bee12a3b90c3a 15-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [c-index-test] Make it C90 compliant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
13c20a77d486c1ce0b6db2b836f2d14daa9e95ff 15-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] A couple of enhancements to c-index-test.

-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
/external/clang/tools/c-index-test/c-index-test.c
792db266f3d2f12a7a16bf37d90074f54bca1e6f 28-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing an objc property, also provide information about
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
/external/clang/tools/c-index-test/c-index-test.c
e1d4330adaaa7faf093e725c9c993207eb2d778a 25-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't record nested macro expansions in the preprocessing record,
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
/external/clang/tools/c-index-test/c-index-test.c
7473b1c6e7ba2654d4a0d469198f0e01b485b51a 14-Feb-2012 Ted Kremenek <kremenek@apple.com> Implement new DiagnosticsRenderer that packages notes retrieved by 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
/external/clang/tools/c-index-test/c-index-test.c
22490747c123a78feec089539f30426084d348cf 14-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicate
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
/external/clang/tools/c-index-test/c-index-test.c
643d3ce93c501d19353f2fa578fee3e97f1d1b4b 15-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfo
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
/external/clang/tools/c-index-test/c-index-test.c
c2be04eaec94e20fc825fb98b713112d9d82562f 13-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fix suppressing of references in macros and suppress
@class forward references.

rdar://10568080&10568103&10568119

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b1febb646bf7a2f319ad894c9833968c52d21711 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: provide both the semantic and the lexical container.

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
/external/clang/tools/c-index-test/c-index-test.c
b526a871af40b84d9878eded54a181bf4003b376 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix indexing of C++ bases in a C++ class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
838d3c23204f52ae27a9f5e9a254238a7ac5d41b 07-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce CXIdxEntityLanguage that indicates the language
of an indexed entity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
da5f2d2360ace0ea32e4f3194906be4899a76c7d 05-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When indexing a field in a C++ class, return an entity
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
996e6e564af7483e2d5e0b70df5fdb9f79ec4b5a 01-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Create a diagnostic set to pass at the end of indexing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6f3ce979a7748fd117e6473d6272b16d643b6262 28-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: If the client requested to get a CXTranslationUnit after
indexing, honor all the TU options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2957e6f8c4c2e58a4b9cb639949fea801970fe36 22-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Support C++ symbols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
87adb0bf9375390de4c66d9e2ad110cc492cd655 18-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Fix syntax according to C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b395c63b473bf1b3783bff371a993332e8c4c5e3 18-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API:

-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
/external/clang/tools/c-index-test/c-index-test.c
3e340a67f4522a2f633a719cb7f3389fe2474374 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: fill the objc category info for a category 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
/external/clang/tools/c-index-test/c-index-test.c
c6b4a5099588fd21b49c80f730a596a64b2766c6 16-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only report one reference
per file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
21ee5707e6e59d982d2f2ae28e079c7ff46dc519 15-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new function to apply the indexing callbacks on an 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
/external/clang/tools/c-index-test/c-index-test.c
c71d55469e7d5f7b376a30620617a175a9442da9 14-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Slight changes to the indexing API and bigger internal changes for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
16ac8be58801d45358497e90a2f82bc155da8a44 14-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Move the check for errors in c-index-test before the TU gets disposed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
bda536df1f5ccd71256eeeab4adbd2cf3769d89e 13-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] for c-index-test, check for CINDEXTEST_FAILONERROR when doing -test-load-source-reparse

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6ec43adc39006a7fce94188956d0239bd54c0363 12-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Further simplify the indexing API.

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
/external/clang/tools/c-index-test/c-index-test.c
8f6457e75d0e0ed2198352a66567c51445d53951 11-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Silence compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a7e8a8394ccaa7a1276d32d0c16515bf4e7b486e 11-Nov-2011 Ted Kremenek <kremenek@apple.com> [serialized diagnostics]: add test cases for serialized diagnostics, 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
/external/clang/tools/c-index-test/c-index-test.c
dd93c596cd95e1b96031ff47efe0a5095ff3d7f1 11-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Simplify the indexing API.

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
/external/clang/tools/c-index-test/c-index-test.c
a4ca95a6ebe85d63df08f3290372e97ddaf0b02a 10-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Fix a comment style. /* It is C source. */

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9190943fef9584edd30d1861f3225c3a4d1c4f53 10-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Fix syntax. It is C source.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
153221717e39ce41323d5bc6b8b8bf130923c1bd 10-Nov-2011 Ted Kremenek <kremenek@apple.com> serialized diagnostics: implement full deserialization of clang diagnostics 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
/external/clang/tools/c-index-test/c-index-test.c
66042b32b3b37ddcba731ff05c2792e3bb572102 05-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For "c-index-test -index-file", print out the names of the callbacks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b4efaa0a14dd2382aa028c03283b5a7f5345e24d 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Add missing return in clang_getExpansionLocation that resulted in 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
/external/clang/tools/c-index-test/c-index-test.c
dcaca015a2f08e03a6d86222fec2e83e04f6b848 03-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] For c-index-test disable caching of code completion results if
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
/external/clang/tools/c-index-test/c-index-test.c
dfca64ddfbdbc48085119f7c943d05881899bf5e 29-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce use of CINDEXTEST_FAILONERROR environment variable 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
/external/clang/tools/c-index-test/c-index-test.c
f89bc0500c74a590ff9e99aab75bcc22d05bc760 20-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Don't use C++-style comments in c-index-test.c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
aca19be8731fc31cff68702de0dc7f30ce908979 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Index implicit property references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c0f5b754eacfd0d1cb5338e048850e5d29ca42f7 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] When printing the diagnostic print it with a new line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
36180f3c846ac9638a41b4d7793de098bfb066a0 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Try fixing MSVC compiler errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4e7064fa7e344e8f87a5b8457e96dfdd252c4a9e 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce a new high level API for indexing clients that assumes
more of the work involved in indexing a translation unit and simplifies client
implementations.

Only C/ObjC for now, C++ (and comments) to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6164ea1d75385b6fc3c19e5ab9bb686298436a5a 14-Oct-2011 Erik Verbruggen <erikjv@me.com> Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
retrieve annotations from completion string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
26fc0f9a078b1a9120547b36804f97c626817bdf 06-Oct-2011 Erik Verbruggen <erikjv@me.com> Fixed GCC (C90) and Clang warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d12059673dcef32bc2b6bae5321654d33863afe6 06-Oct-2011 Erik Verbruggen <erikjv@me.com> Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
aed123ec3cc37e457fe20a6158fdadf8849ad916 06-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,
and a callback and finds all identifier references of the cursor in the file.

rdar://7948304

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ee0f84fc84ed7de7975e102668d8e53a778f7a8c 26-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't map a file:line:col triplet that is inside the preamble range to
a "loaded" location of the precompiled preamble.

Instead, handle specially locations of preprocessed entities:
-When looking up for preprocessed entities, map main file locations inside the
preamble range to a preamble loaded location.
-When getting the source range of a preprocessing cursor, map preamble loaded
locations back to main file locations.

Fixes rdar://10175093 & http://llvm.org/PR10999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
40098e8cd7268535ba581b50af0304b7ecacbef5 12-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
which when set it determines the trial number after which the remapping of files should
take effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b22732365ca26fbccacc4bdd32e875342f571e94 29-Aug-2011 Matt Beaumont-Gay <matthewbg@google.com> Fix type mismatch in initialization (caught by -Wliteral-conversion)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8fa0a80b4482ad94e82c4a19e23de17fd69140b5 04-Aug-2011 Douglas Gregor <dgregor@apple.com> Add a new libclang API to return a CXCompletionString for an arbitrary
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0a47d69af8bda945352997af3da4687a3356096a 26-Jul-2011 Douglas Gregor <dgregor@apple.com> Add new libclang API, clang_codeCompleteGetObjCSelector(), which
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
430d7a1a621a126a9ffe442ad8987ba02b46dae9 25-Jul-2011 Douglas Gregor <dgregor@apple.com> Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
a cursor reference, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e081a61bb0dc546fd623bf259435d17c9a4ea0d5 21-Jul-2011 Douglas Gregor <dgregor@apple.com> New libclang API to expose container type for code completion, from
Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ba7537febdf1bc1cc617e1f1746f2644feba6274 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> NestedMacroInstantiations -> NestedMacroExpansions

This is switches all the interfaces points (and most of the commenst
/ local variables I saw on my way through) regarding the
NestedMacroInstantiations bit.

The libclang enums corresponding to this state were renamed, but
a legacy enum was added with the old name, and the same value to keep
existing clients working. I've added a documentation blurb for it, but
let me know if there is a canonical way to document legacy elemenst of
the libclang interface.

No functionality changed here, even in tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3da626b4f38eb0350de960d71271ca77af7a9cc8 07-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang aPI function,
clang_codeCompleteGetContexts(), that provides the client with
information about the context in which code completion has occurred
and what kinds of entities make sense as completions at that
point. Patch by Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
08aa622ab923fb8a2751f213feee0b9124ee86fb 07-Jul-2011 Francois Pichet <pichet2000@gmail.com> MSVC doesn't like mixing declarations and statements in a C file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
39c411fa229b2a6747b92f945d1702ee674d3470 06-Jul-2011 Douglas Gregor <dgregor@apple.com> libclang: Allow callers of clang_saveTranslationUnit() to distinguish
between different classes of errors. Addresses most of
<rdar://problem/9660328>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b83d4d7071cea43a3f7b8afc3cda6203c345aa0f 13-May-2011 Douglas Gregor <dgregor@apple.com> Add c-index-test printing and tests for static and virtual method
query functions, from Erik Verbruggen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
dca8ee8b7bc86076916a3a80f553f7a4e98c14af 06-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang parsing flag,
CXTranslationUnit_NestedMacroInstantiations, which indicates whether
we want to see "nested" macro instantiations (e.g., those that occur
inside other macro instantiations) within the detailed preprocessing
record. Many clients (e.g., those that only care about visible tokens)
don't care about this information, and in code that uses preprocessor
metaprogramming, this information can have a very high cost.

Addresses <rdar://problem/9389320>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
dd3e5549e3c11e217078938aacf72f042eea5343 04-May-2011 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that
is intended to be guarded from multiple inclusions within the same
translation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f787002478f09af1741fb0f82a562002e6799c49 20-Apr-2011 Ted Kremenek <kremenek@apple.com> Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4e6a3f7310d3d9232877ed6f439247b1054b1e47 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Report memory usage for global code completion results in CXTUMemoryUsage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3c683367073e2d98a9046060f9bc7db872a1c63d 19-Apr-2011 Francois Pichet <pichet2000@gmail.com> Unbreak the MSVC build: Don't mix variable declarations and statements in a .c file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
59fc1e55da9c856d1703d3d3ac14a36320d26b30 19-Apr-2011 Ted Kremenek <kremenek@apple.com> Add libclang API to query how much memory is used by a CXTranslationUnit. This is a WIP. Currently we report
the amount used for expressions, types, identifiers, and selectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6d5552131a4637f9bbe8c93386648e9bbb2c30fe 09-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> c-index-test.c: Fix cygwin warning not to pass signed char to islower(c).

Cygwin's ctype.h says;
/* These macros are intentionally written in a manner that will trigger
a gcc -Wall warning if the user mistakenly passes a 'char' instead
of an int containing an 'unsigned char'.
(snip) */

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4814fb560322daf009fda6226cffccb10bd44620 04-Feb-2011 Douglas Gregor <dgregor@apple.com> If any Fix-Its attached to a diagnostic have invalid source locations
or source locations that refer into a macro instantiation, delete all
of the Fix-Its on that diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4f5e21e24fb9e6ec473a13f83b5c9a2c41501a70 31-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach Diagnostic::setClient() to free the existing, owned
client. Fixes a libclang leak.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1aa27307c462baaa9e5fda14ff6797dd39fe8b84 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Teach ASTUnit to save the specified target features, since
TargetInfo::CreateTargetInfo() mangles the target options in a way
that is not idempotent. Fixes <rdar://problem/8807535>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e72fb6f40231a1e8372c7576b69f06f0a1eb28a7 27-Jan-2011 Douglas Gregor <dgregor@apple.com> Add libclang functions to determine the const/volatile/restrict
qualifiers on a CXType. Patch from Stefan Seefeld, test by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
bdc4b366e80c125184a3b3c56fa4619cb4ac9e45 30-Nov-2010 Douglas Gregor <dgregor@apple.com> De-C99-ify for loop

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8e08dec6374473b11c019035aef130e0bb0551f9 30-Nov-2010 Douglas Gregor <dgregor@apple.com> Teach c-index-test to reparse the source file a few times when testing
clang_getCursor() via -cursor-at=??? and CINDEXTEST_EDITING is set in
the environment. This mirrors how we test code completion and
source-loading in the presence of this environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
aa5f135f8db82b5e5fb1640fd51f8078e0b2d82d 19-Nov-2010 Douglas Gregor <dgregor@apple.com> Extend the libclang diagnostic API to provide information about the
option name, category ID, and category name corresponding to a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a60ed47da13393796d8552b9fdca12abbb3eea42 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Change CXTranslationUnit to not directly cast to an ASTUnit*,
but to wrap both an ASTUnit and a "string pool"
that will be used for fast USR generation.

This requires a bunch of mechanical changes, as
there was a ton of code that assumed that CXTranslationUnit
and ASTUnit* were the same.

Along with this change, introduce CXStringBuf,
which provides an llvm::SmallVector<char> backing
for repeatedly generating CXStrings without a huge
amount of malloc() traffic. This requires making
some changes to the representation of CXString
by renaming a few fields (but keeping the size
of the object the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119337 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ed122735639d83c10f18c28c7fd117bfcd0f62cb 16-Nov-2010 Ted Kremenek <kremenek@apple.com> Move CXString creation/management routines into
their own .cpp file and make the interpretation
of its flags private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
08bb4c622d0b79c33b4ac78ce1bec79398953daa 16-Nov-2010 Douglas Gregor <dgregor@apple.com> Tweak libclang's heuristics for building precompiled preambles and
caching global code-completion results. In particular, don't perform
either operation the first time we parse, but do both after the first
reparse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a9b06d4c246d6c301e3dd1844f5dba669ed9c631 09-Nov-2010 Douglas Gregor <dgregor@apple.com> ntroduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.

Take 2: this time, adjusted tests appropriately and used a "simple"
approach to the spelling location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
27a31fe6fac7eb98ece172bf83af93a3a103f5b4 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Revert r118492, which didn't update all of its tests accordingly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b6278715de9530aea42ff3f9d4064fb5bed13343 09-Nov-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getSpellingLocation() into libclang, to provide the
location where we're spelling a token even within a
macro. clang_getInstantiationLocation() tells where we instantiated
the macro.

I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs,
since they gloss over macro-instantiation information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118492 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
84294911b83003bcac726d00ffa91143752feb57 04-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Adjust return type of thread_runner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a32a6e1abe6972b48b4d5ec79d81b6f7241723bf 04-Nov-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Switch to using clang_executeOnThread instead of mucking about
with system specific stuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6160598bcd6549757525cbb463a551a0ad1615e4 27-Oct-2010 Douglas Gregor <dgregor@apple.com> Add an environment variable that allows us to turn off threading in c-index-test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ecdcb883cbc6bb4a2445dc6f02d58d9bdb54a0ed 21-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend the preprocessing record and libclang with support for
inclusion directives, keeping track of every #include, #import,
etc. in the translation unit. We keep track of the source location and
kind of the inclusion, how the file name was spelled, and the
underlying file to which the inclusion resolved.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
93f5e6a5d7690f90bc8a94e6b40d6c7d19719e0c 20-Oct-2010 Ted Kremenek <kremenek@apple.com> Call clang_disposeTokens() when we are done with the set of tokens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c44fe4bf2962bfcb323e93a63ba4a72d67839cde 12-Oct-2010 Francois Pichet <pichet2000@gmail.com> This patch remove the Win32 XFAIL from remap-complete.c

The problem was that text files were open in text mode and Microsoft implementation of fread and write will try to do nasty line-feed conversion which make the line position no longer valid. The fix is to read and write files in binary mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
32be4a588fbb87d0d163ead49c42f5438bf0b2b7 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b10daedb8fc4c6f70a66dbc1a6eea01684bb4e77 11-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_setUseExternalASTGeneration() from libclang. Between
improvements to the compiler and the introduction of crash recovery,
it no longer makes sense to allow this mode. Moreover, this eliminates
one use of the "clang" executable from within libclang; we'd like them
all to go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
5a9c0bca4504eeda45a3fd0ae1c244b2994f38b2 08-Oct-2010 Douglas Gregor <dgregor@apple.com> Fix the mapping of vertical-space cursor kinds to produce a newline,
rather than a space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
358559d8d7b458c5f64941842383a16e61f0828d 03-Oct-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function, clang_getCursorDisplayName(), which
produces a simple "display" name that captures the
arguments/parameters for a function, function template, class
template, or class template specialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9f59234a91d057cee7c5e3cee91da8696858c692 01-Oct-2010 Douglas Gregor <dgregor@apple.com> Extend libclang with an API that determines, given a C++ virtual
member function or an Objective-C method, which other member
functions/methods it overrides.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
25d9b00ab0b128d651d993c38726a00cd9969124 01-Oct-2010 Dawn Perchik <dawn@burble.org> perform_code_completion(): fix type declaration for TU.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6edc8001f2c2f5a95ed29259d8f2c0b9faa4bc83 30-Sep-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Run inside a separate thread iff we have pthread support, to
ensure we at least get some minimal testing of running in a multithreaded
environment (for example, having a reduced stack size).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1f6206ed21e026ca7ddaf0bff9599c476301a695 14-Sep-2010 Douglas Gregor <dgregor@apple.com> I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.
I will not mix declaration and statements in C90.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1f60d9ea523fc321d811fe880ba9a1ec74fa8f9b 14-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new kind of cursor into libclang, which covers a reference
to an "overloaded" set of declarations. This cursor kind works for
unresolved references to functions/templates (e.g., a call within a
template), using declarations, and Objective-C class and protocol
forward declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e0329acf5c9437e2086a2fb2bf7a95ae2ac96505 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang function,
clang_getSpecializedCursorTemplate(), which determines the template
(or member thereof) that the given cursor specializes or from which it
was instantiated. This routine can be used to establish a link between
templates and their instantiations/specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3064ef9e604d19a0cfd0d8e3ed3055bfd83f88fd 27-Aug-2010 Ted Kremenek <kremenek@apple.com> Implement CXCursor support for walking C++ base specifiers. This includes adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier.

Implements <rdar://problem/8274883>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1e5e6684b0f27701e6f7c65f8c6a32a10cbcc3ed 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.

3rd try. How embarrassing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1cb237fbf9e52e17f1e03b6f80c1114f47f93781 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
be13afea6d9a5dc8877d5553552bd07c733a99bf 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.

Provide a libclang function that sorts the results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112149 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
95f33555a6d51b6537a9ed3968c3d1c2e4991b51 26-Aug-2010 Ted Kremenek <kremenek@apple.com> Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9214819c7d4b24fd1b38480d845d8e345d8f0196 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Revert "Move the sorting of code-completion results out of the main path and
into the clients", because the C standard library sucks. Where's my
stable sort, huh?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c7ed372ec7b1c9be05d022e9bc23cd8641f2b28b 26-Aug-2010 Douglas Gregor <dgregor@apple.com> Move the sorting of code-completion results out of the main path and
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
58ddb60f409125eda5436c4a1f070f7fa4744295 24-Aug-2010 Douglas Gregor <dgregor@apple.com> Introduce new libclang API functions that determine the availability
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2de41c9c99e0e9ae6488d04c08423a5c1190109e 20-Aug-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Diagnose parse / completion failures in -code-completion-at=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
43f331d0fdacb343749dd1d6f84617c2b60c3d5b 20-Aug-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: As with reparse, only honor remapped false during the code
completion step with -code-completion-at=, to allow testing simulated source
changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
653a55f4bc0cb1d0c1f3ff86e9559f744eb3c18f 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix a c-index-test leak with file remapping

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c8a618002ca57495bf70e055bcafe918859cf4ca 19-Aug-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
87c08a5d6b9e1e44ae6f554df40139d3a6f60b33 14-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement caching of code-completion results for macro definitions
when the CXTranslationUnit_CacheCompletionResults option is given to
clang_parseTranslationUnit(). Essentially, we compute code-completion
results for macro definitions after we have parsed the file, then
store an ASTContext-agnostic version of those results (completion
string, cursor kind, priority, and active contexts) in the
ASTUnit. When performing code completion in that ASTUnit, we splice
the macro definition results into the results provided by the actual
code-completion (which has had macros turned off) before libclang gets
those results. We use completion context information to only splice in
those results that make sense for that context.

With a completion involving all of the macros from Cocoa.h and a few other
system libraries (totally ~8500 macro definitions) living in a
precompiled header, we get about a 9% performance improvement from
code completion, since we no longer have to deserialize all of the
macro definitions from the precompiled header.

Note that macro definitions are merely the canary; the cache is
designed to also support other top-level declarations, which should be
a bigger performance win. That optimization will be next.

Note also that there is no mechanism for determining when to throw
away the cache and recompute its contents.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1999844e7a18786e61e619e1dc6c789827541863 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Add an options parameter to clang_saveTranslationUnit, because we'll want it later

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
7ae2faafd30524ef5f863bb3b8701977888839bb 13-Aug-2010 Douglas Gregor <dgregor@apple.com> Implement clang_saveTranslationUnit(), which saves a translation unit
into a PCH/AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e1e13bf568a7e37c95eda6fcfa626659a06e67b1 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b1c031be513705d924038f497279b9b599868ba1 10-Aug-2010 Douglas Gregor <dgregor@apple.com> Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d91de2bc0ee43c2da7be2fb879e8919ea74f8afa 09-Aug-2010 Daniel Dunbar <daniel@zuster.org> Fix mixed declarations and code warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
df95a13ec73d2cdaea79555cb412d767f4963120 09-Aug-2010 Douglas Gregor <dgregor@apple.com> Use precompiled preambles for in-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
cee235cdf0b8047761ffac598c4c3a32ab7411a2 05-Aug-2010 Douglas Gregor <dgregor@apple.com> Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1abc6bca3d7fb0e7b1e40fbcad6cfb5e10594548 04-Aug-2010 Douglas Gregor <dgregor@apple.com> Add code-completion support directly to ASTUnit, which performs code
completion within the translation unit using the same command-line
arguments for parsing the translation unit. Eventually, we'll reuse
the precompiled preamble to improve code-completion performance, and
this also gives us a place to cache results.

Expose this function via the new libclang function
clang_codeCompleteAt(), which performs the code completion within a
CXTranslationUnit. The completion occurs in-process
(clang_codeCompletion() runs code completion out-of-process).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3ce9e7d270e7df86c09c8126b4412d55be7c123b 30-Jul-2010 Ted Kremenek <kremenek@apple.com> Add clang_isPODType() for querying if the CXType is POD. Implements <rdar://problem/8250669>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6be2a22979e6a4af575af32cccdf6a6190a8edca 26-Jul-2010 Dan Gohman <gohman@apple.com> Fix an apparent bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
45ba9a1b31110568d0d362c8d31c6133cf9011b7 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Start removing the use of smart pointers from the Parse/Sema
interaction, by effectively defaulting to
DISABLE_SMART_POINTERS. We're embracing the model where all AST nodes
are ASTContext-allocated and live as long as the ASTContext lives.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
44c181aec37789f25f6c15543c164416f72e562a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Basic plumbing for generating a precompiled preamble for an
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
53513d2e24205965ffd5d4780a10f41cc335f17b 22-Jul-2010 Chandler Carruth <chandlerc@gmail.com> This was still complaining about the length of the string. I've broken it here
to try to keep as much logical grouping as possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
caf4bd3d3c66fd95b0159356e2c4da7fbf2897f3 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Slip up long string literal

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
abc563f554951259bbe0315055cad92ee14d87e4 19-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API, clang_reparseTranslationUnit(), which
reparses an already-parsed translation unit. At the moment it's just a
convenience function, but we hope to use it for performance
optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1982c18522a4aefd57207bbd2d66d93945c41f92 12-Jul-2010 Douglas Gregor <dgregor@apple.com> Add a -code-completion-timing= mode to c-index-test, so that we can
test the performance of code-completion without testing the
performance of printf().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e1403d2dcb06fc306e186c787a7bd0ca30e06ede 22-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> Silence warning about C++-style comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9a140845438c2fc31e7d48a6dedbc695f4c83c68 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for querying the return type of Objective-C methods. This is done by
adding a clang_getCursorResultType() function (which complements clang_getResultType()).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
04c3cf35a80c09ab78e519f2e71ecccd5c5d8da0 21-Jun-2010 Ted Kremenek <kremenek@apple.com> Add CXType support for FunctionNoProto and FunctionProto types. This includes adding a new
function, clang_getResultType(), which returns the result type of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
12e131385e892e3723483a1081a89bcad29c8a84 27-May-2010 Douglas Gregor <dgregor@apple.com> Introduce priorities into the code-completion results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8e0ac174c8c8c980927b3e1447f16f62fbe2a2e4 14-May-2010 Ted Kremenek <kremenek@apple.com> Add CXType and an initial set of supporting functions to libclang. This exposes details of
Clang's representation of the C type system to clients. It is nowhere near complete, and will
be expanded on demand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e542f7723a929d42bd9e4dfa526b4ede915b91a7 21-Apr-2010 Ted Kremenek <kremenek@apple.com> Fix USRs for 'extern' variables declaration in functions/method bodies.
Fix USRs for @synthesize.
Add more USR tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e74ef1289d5fff0a6ea573198bf354fa8cd84d51 16-Apr-2010 Ted Kremenek <kremenek@apple.com> Rework USR generation for symbols with no linkage. Many of the USRs are now shortened,
and we now include the file name that declares the symbol with no linkage in the USR.
USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations,
typedefs, etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f7b714df46cdbdf9e2ebf26eb2fd7881790d83e6 25-Mar-2010 Ted Kremenek <kremenek@apple.com> Add c-index-test support for printing USRs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c2a2b3c2c2da1086d76bf804633ed5c6c48ae722 04-Mar-2010 Douglas Gregor <dgregor@apple.com> c-index-test's printing of linkage was completely broken, as was the
test of this functionality. The API worked great, though! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3bed527b10502c6a5916ebb6e6abc49687ce1444 03-Mar-2010 Ted Kremenek <kremenek@apple.com> Add '-test-print-linkage-source' option to c-index-test
to test clang_getCursorLinkage()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
274f1906f12ebf8fcc179701deeda6d3271120c1 23-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework the CIndex API for displaying diagnostics. Instead of printing
the diagnostics to a FILE*, return a CXString containing the formatted
diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
473d7019bb54f8a2f0140dca9e9644a935cc6b20 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0a812cf707da15dadd19fdeb0178b9707f4e01a6 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
436f3f0400c633251e4071f81358c47bab964adf 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b9c8a24d04d5e5b3107656d8e03e21d3816c081e 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b2710713377f3b900a92ab69c4cf091f560a5cfb 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4c58923ca904733d588ddb1cec58549b6bc7dfa9 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a88084b78fd4ca5d3d858c14b02414f8cc399f02 18-Feb-2010 Douglas Gregor <dgregor@apple.com> Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2ef6f8f5a35a60870594c5b04e0aa2bf22c6886f 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Convert clang_getCompletionChunkText() to return a CXString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e68fff6fc083c6270d835216a3de0b82c6ef0310 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getCursorKindSpelling() to return a CXString
instead of a 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
74844072411bae91d5dbb89955d200cbe1e0a1c8 17-Feb-2010 Ted Kremenek <kremenek@apple.com> Change clang_getFileName() to return a 'CXString' instead of 'const char *'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9715082c882617eee831af51979c332ab0e71f0d 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Pass appropriate client data.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d52864bd33c66aacc84133460d8c9c0dfcdd5c18 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> CIndex: Switch CXSourceRange to proper half-open intervals.
- Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8f0bf81c0f3ab31881cc7db7914e6978bb2a19af 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Unify and always print half-open extents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2389eff26431b4f77d3383157adb2c8ccc15ff69 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Simplify file scanning code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
51b058cb1e726c49fe0fae29404a4ca4308a6a12 14-Feb-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Unify syntax for printing extents. Yes, there were 4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
020a095de30ede5b1e3fc65dae501f225a1c89d3 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Attempt to always dispose of the CXIndex object in c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b1ffee6e574d57b79ce2defd1b57052649221c03 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> c-index-test: Add "none" filter, useful for performance testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a3890baf1256ff26081306c7fef70202f8223f41 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
51c6d384551674facc19f745ecf6e289d28dc55f 29-Jan-2010 Douglas Gregor <dgregor@apple.com> When printing diagnostics in c-index-test, also print source ranges
and fix-it information, so we can see everything in one place. Along
the way, fix a few bugs with deserialization and query of diagnostics
in CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
936ea3b590117d2cd73b1b92621d06c4a7edbe60 28-Jan-2010 Douglas Gregor <dgregor@apple.com> Switch the remaining diagnostic printing in CIndex over to the
diagnostic callback mechanism, so all diagnostics now go through that
callback. Also, eliminate the displayDiagnostics flag to
clang_createIndex(), since it is no longer necessary: the client
determines whether to display diagnostics or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
5352ac06d8f6194825bb2a99ffa009b61bafb503 28-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement a diagnostics callback for the C interface to Clang, so that
clients can format diagnostics as they wish rather than having to
parse standard error. All of the important parts of the front end's
diagnostics are exposed: text, severity, location, source ranges, and
fix-its. The diagnostics callback is now available with
clang_createTranslationUnitFromSource() and
clang_createTranslationUnit().

As part of this change, CXSourceLocation and CXSourceRange got one
pointer larger, since we need to hold on to the SourceManager and
LangOptions structures in the source location. This is the minimum
amount of information needed for the functions that operate on source
locations and ranges (as implemented now). Previously we held on to
the ASTContext, but the diagnostics callback can end up with source
locations when there is no ASTContext (or preprocessor).

Still to do:
- Code completion needs to support the diagnostics callback, once we
have the ability to (de-)serialize diagnostics.
- Eliminate the "displayDiagnostics" argument to createIndex; we'll
always pass diagnostics to the callback and let it deal with display.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
16b55a71695a33c094383295cc7b7a2080e098da 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Implement 'clang_getInclusions()' in CIndex. This API allows clients to walk the set of files included in a translation unit via the C API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
46766dc31c09d89024de5aba9e22112a56eadbdf 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate clang_getInstantiationLocationOffset(), and instead add an
offset parameter to clang_getInstantiationLocation().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0045e9fe1f7dfc37f1ea7bdb9b70bcdb6700f0c0 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement clang_annotateTokens(), which associates cursors with each
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
/external/clang/tools/c-index-test/c-index-test.c
ce2ae88f834c740a28b7e074a4477039918f9bb0 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Add 'PostVisitTU' callback hook to 'perform_test_load()' to allow a special callback after the translation unit has been loaded (and streamed).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e3ee02a324559829142f387f75daf3da118442be 26-Jan-2010 Ted Kremenek <kremenek@apple.com> Allow the 'visitor' argument to 'perform_test_load()' to be NULL. The
utility of this change will be made clearer in a subsequent patch when
perform_test_load()' does more than stream the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
fc8ea23eb6cbaaa5046f2abb4c033e24c8659efd 26-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce a CIndex API for lexing the raw tokens within a given source
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
/external/clang/tools/c-index-test/c-index-test.c
4db64a461cb3442934afe43c83ed3f17f7c11c1d 23-Jan-2010 Douglas Gregor <dgregor@apple.com> Extend clang_createTranslationUnitFromSourceFile() to support creating
translation units that include unsaved files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b979034b100be14de2223f2b8f6cc7a3275cbe4f 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Yet more CIndex API cleanup:
- Added more routines to manipulate/compare source locations and ranges
- Switched clang_getCursor() over to take a CXSourceLocation rather
than file/line/column.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b2cd48756119f4d8d2a865b4b3e0e8efd02e26a0 21-Jan-2010 Douglas Gregor <dgregor@apple.com> Stash a CXXUnit pointer into each cursor. This allows us to simplify
the interface to clang_visitChildren() by eliminating the
CXTranslationUnit pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e5b72bac8312f83aeb2e29b3988ebfa30f2b4ca2 20-Jan-2010 Douglas Gregor <dgregor@apple.com> Switch c-index-test from clang_loadDeclaration() and
clang_loadTranslationUnit() over to clang_visitChildren().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1db19dea8d221f27be46332d668d1e2decb7f1ab 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework the CXSourceLocation and CXSourceRange APIs. They are now
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
b699866820102a69d83d6ac6941985c5ef4e8c40 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate cursor kinds used to express definitions. Instead, provide
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.

This is another API + ABI breaker with no deprecation. Yay, progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c5d1e9375d71e66d22456e7cc52cc7c0a5c65c3f 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getCursorReferenced, to get a cursor pointing at the
entity that a particular cursor references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a7bde20f8c6334ccc3a7ef4dd77243d0921a8497 19-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement clang_getCursorExtent, which provides a source range for the
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.

Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
98258afae66bab39b0c57a3efb6b20d4fbb5746c 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Introduce clang_getCursorLocation(), which supercedes
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3c7313d96cd4a18cd8c1fcd3ddd8128c2fcbe58f 18-Jan-2010 Douglas Gregor <dgregor@apple.com> Clean up the CIndex API slightly.

Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.

Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
cf84aa46def41cccf4dd4c51cd0543b70c11e4eb 18-Jan-2010 Ted Kremenek <kremenek@apple.com> Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
70ee54258035c860ebc71f7e5f803b74f3186889 16-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove TranslateKind and centralize Decl -> CXCursorKind in GetCursorKind(). This revealed a bunch of inconsistencies in how CXCursorKinds were being computed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
283cae37b03047c14ef918503bc46b08405c3b69 15-Jan-2010 Douglas Gregor <dgregor@apple.com> Make CXCursor's data opaque.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f2c87bd0368775927ead93e0dee3e4f3ca3f9a63 15-Jan-2010 Douglas Gregor <dgregor@apple.com> Add -cursor-at=file:line:column command line option to c-index-test,
to directly check the results of clang_getCursor(). Also, start
migrating some index-test tests over to c-index test [*] and some
grep-using tests over to FileCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
7d40562f83552b7295411e10ee887d8d55470679 13-Jan-2010 Ted Kremenek <kremenek@apple.com> Add USR printing modes to c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
98271567b6f10be85bcc75d0bbb67416c8cfb83a 12-Jan-2010 Ted Kremenek <kremenek@apple.com> Make 'CXTranslationUnitIterator' an argument to perform_test_load(),
perform_test_load_tu(), and perform_test_load_source().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
01dfea02d1da297e8b53db8eea3d3cc652acda8d 11-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve code completion by introducing patterns for the various C and
C++ grammatical constructs that show up in top-level (namespace-level)
declarations, member declarations, template declarations, statements,
expressions, conditions, etc. For example, we now provide a pattern
for

static_cast<type>(expr)

when we can have an expression, or

using namespace identifier;

when we can have a using directive.

Also, improves the results of code completion at the beginning of a
top-level declaration. Previously, we would see value names (function
names, global variables, etc.); now we see types, namespace names,
etc., but no values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9096a20fc0fd799911b738ce7a9134dbacaf64b7 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Add FileCheck prefix to another location in the output of c-index-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
377adb6cffb3fdfcf659303d6f901adef4d61971 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Remove unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
fe6fd3d41a7f48317d6856c9327b6cead32c3498 06-Jan-2010 Ted Kremenek <kremenek@apple.com> Add C API hook 'clang_getDeclExtent()', which returns the source extent of a declaration. This implements <rdar://problem/7280072>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aa 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend code-completion results with the type of each result

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ec6762c709726bf2ee5f76c21df81e71a56e6f81 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Change clang_codeComplete API to return the results in a structure on
the heap, so that clients are not forced to copy the results during
the initial iteration. A separate clang_disposeCodeCompleteResults
function frees the returned results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4da689a0252275e865af846f0e75e733ba954ec2 17-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Test for errors during fread() inside c-index-test and handle them
appropriately. This also silences some pedantic GCC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8506dde586459887b7e14e23a30af8ac5be5adb6 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
- This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
- For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New: 1.9038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
735df88a38e80c1ca70daa889aa516b8b9f54b50 02-Dec-2009 Douglas Gregor <dgregor@apple.com> Extend the CIndex code-completion API to perform code completion
involving unsaved files, using the -remap-file= functionality recently
added to clang-cc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
625e4efc2c64b638285c9f836cc00a3ad7d0bd5f 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> c-index-test: Split "function scanning" behavior into its own "filter" -- its
quite slow and doesn't really stress the APIs people should really use.
- I'm not even sure if this mode is still useful given the other scanning mode;
Steve?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ada487d498d82277bbc60312fc6f6479f0afda76 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add c-index-test -test-load-source, which loads the translation unit from a source file (and other command line arguments).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1d5fdf3d3b5ea2640ebe8673814a0b6ab7cf5eb2 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add special clang_getCursor() support for @class. Handles <rdar://problem/7383421>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
a9933b98399f656653a0876fc39e5b9093efb732 17-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> fgetln is a BSDism; replace it with more portable code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1c6da1735ddc5978a2c24394c5112b4868b347f0 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Add c-index-test mode "-test-file-scan", which scans a source file and calls clang_getCursor() on every character.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0d435191fc8f78338c2ef26d566cfe4d2c52c706 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Organize c-index-test into logic sections, and add section headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f5d9c9340b1a5ecd6ab62b916600b6e19e69539f 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Clean up c-index-test command line usage a bit by requiring a "-test-load-tu" option when testing clang_loadTranslationUnit(). Running c-index-test without the correct arguments now also prints a useful summary of its correct usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9298cfc7475c48fa42b168c37f628663d65ddde7 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Have clang_getCursorSource() return NULL when the source location is invalid or refers to a built-in buffer. Implements <rdar://problem/7296243>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
88d23952eadb0737e5bd839654d69a0a578e19bc 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve c-index-test's parsing of the -code-completion-at=file:line:column argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ef0cef6cec8de5fc60e469a93436eed7212e0dc2 09-Nov-2009 Steve Naroff <snaroff@apple.com> Introduce CXString type and associated functions clang_getCString() and clang_disposeString().

This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
d5a2089663d81faee0de031deabc418fa53ecf3b 09-Nov-2009 Douglas Gregor <dgregor@apple.com> C doesn't allow mixing declarations and statements, silly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
3ac738567fdf4df636b9e76c5a2d3dc3d6f80235 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Minor cleanup for CIndex-based code-completion:
- Provide an actual test for code-completion via CIndex.
- Actually print optional strings in c-index-test
- Export clang_getCompletionChunkCompletionString from CIndex



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4ee17acbf765e75d77fe12f2eaa7867d5c17e4d7 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Revert unintentional change to this file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4dc99f8928f0d21b15edccb03dbc9492a1ba87f7 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> CIndex: Add temporary hack to leak memory instead of returning invalid pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f8297f1512d29c88f20bf2901f04cc04182a3eee 07-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix some build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
0c8296dfb495f41d6f0de6fe1d03014ffd063674 07-Nov-2009 Douglas Gregor <dgregor@apple.com> Various improvements to Clang's code-completion infrastructure:
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.

The last doesn't have tests yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f96b524306ccfa623235d375deee79637bd38f29 28-Oct-2009 Steve Naroff <snaroff@apple.com> Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.

Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.

I wanted to land the major changes before finishing up the optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2e06fc877a633abea3b40a64950c7316dac29ca8 27-Oct-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Changes for building as a Windows DLL

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
cab9882dac2ef4ea5f4e2cb2da91a7f43ced17c1 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
fbcb2b716bee88c754684bd189913ed9f8c09086 22-Oct-2009 Ted Kremenek <kremenek@apple.com> Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
6a6de8b4fc944ca1bfa4e47c516d049a0d627b0e 21-Oct-2009 Steve Naroff <snaroff@apple.com> Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'.

snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out
snaroff% cat Large.m
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <OpenGL/OpenGL.h>

With a 'relativeDecl', it takes <30 seconds:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e56b4baeba5097852e04bc41ca2e0396cf729955 20-Oct-2009 Steve Naroff <snaroff@apple.com> - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.

- Remove clang_wantOnlyLocalDeclarations().

- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().

- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
1374598619f83e6b2de91341a326eae564ece2cb 20-Oct-2009 Ted Kremenek <kremenek@apple.com> Really fix <rdar://problem/7312058> by adding a 'displayDiagnostics' option to
clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now
specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can
obviously evolve this API to be more general in the future.

Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous
to '/dev/null' on Windows.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
85f5468d87c2e767ee632c16d01c7d9e31a1fcbd 17-Oct-2009 Ted Kremenek <kremenek@apple.com> Fix compiler warning: "ISO C90 forbids mixed declarations and code"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8ce88a449c4ae09af2108f5c1203caa37145817d 17-Oct-2009 Ted Kremenek <kremenek@apple.com> Fix warning: 'warning: C++ style comments are not allowed in ISO C90'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
02465750c8c3fa96b1e7e596b02297e24361dc4f 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Make CIndex and c-index-test a little bit more robust. The only
substantive change is that clang_getCursorSource() now returns the
file in which a macro was instantiated when the cursor points into a
macro instantiation, rather than crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
7d1d49d2971b20a97b3c2a301470b9eaaa130137 16-Oct-2009 Douglas Gregor <dgregor@apple.com> Keep track of whether declararions were loaded from a precompiled
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
e19944c93961b7618f4f3f3185f698f46369ea54 16-Oct-2009 Steve Naroff <snaroff@apple.com> Make sure temporary files get unlinked.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f393c3b770c86446b20e6fd4bcf08a31442d1b1d 05-Oct-2009 Eric Christopher <echristo@apple.com> Fix C90 compile warning about mixed declarations and code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
85e2db72137c28114d3981c044946a8c16ef6011 01-Oct-2009 Steve Naroff <snaroff@apple.com> Add support for class and protocol references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
699a07d8a0b1579c5178b3baf4bcf9edb6b38108 25-Sep-2009 Steve Naroff <snaroff@apple.com> Add clang_getDeclLine and clang_getDeclColumn
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
ff9e18cb3863defa98257500ef49d93a9d2bc216 24-Sep-2009 Steve Naroff <snaroff@apple.com> Add test for C-based indexing API, using FileCheck utility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f7469a38ca835681a64959d71c4792d93a7b1d00 23-Sep-2009 Steve Naroff <snaroff@apple.com> Some minor cleanups...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
4ade6d6eae934f796ca43c81a5aa185e456dde9b 23-Sep-2009 Steve Naroff <snaroff@apple.com> More work to enable more exhaustive testing of the indexing API.

Next step: Add actual some test cases:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
77128ddd3077fc045751a55bb3226802b15d5510 15-Sep-2009 Steve Naroff <snaroff@apple.com> - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
8b26cbd4e4c01cb7a06ec2f794f2fce3b58cf4d0 11-Sep-2009 Steve Naroff <snaroff@apple.com> Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
9efa767be8e9f2dae509d3a0be93ade01bfa1560 04-Sep-2009 Steve Naroff <snaroff@apple.com> Implement accessors clang_getCursorKind(), clang_getCursorDecl().
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
af08ddc8f1c53fed8d8d0ad82aa2a0bb7d654bd1 03-Sep-2009 Steve Naroff <snaroff@apple.com> - Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
bce6f62ae7d2c15992617f64e30067803fb5b47f 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Visit function/method bodies and issue callback for parameters and local
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
23d8bea7056e7f474ce7f42042021a148feee8f7 03-Sep-2009 Steve Naroff <snaroff@apple.com> Visit function/method bodies and issue callback for parameters and local variables.
Add clang_getTranslationUnitSpelling().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
10c2d319a8868a66c815df5882e5dbfd0509f25d 02-Sep-2009 Eli Friedman <eli.friedman@gmail.com> Fix warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
f334b4e3eda5a39f041fe13f805dbb53535daa2f 02-Sep-2009 Steve Naroff <snaroff@apple.com> Start issuing callback for references (add some predicates, refactor some code).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
c857ea4d22e1e6dd9ede1f0e84d48b157c6924fd 02-Sep-2009 Steve Naroff <snaroff@apple.com> Flesh out CXCursorKind...

- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).

Add client data to clang_loadDeclaration() and implement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2b8ee6c2994f738e5162ff46b638974870f51662 01-Sep-2009 Steve Naroff <snaroff@apple.com> Add explicit "blind" client data to callback function (since we aren't using blocks).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
2d4d629d8a0de5112c7ae9d05c03ddbf6dcd956a 31-Aug-2009 Steve Naroff <snaroff@apple.com> Implement source/line/column hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
89922f86f4e7da383af2a62ef04ad8b93b941220 31-Aug-2009 Steve Naroff <snaroff@apple.com> More fleshing out the C-based indexing API (under construction).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/tools/c-index-test/c-index-test.c
50398199fb10e196a8d92fbf7a062dbe42ed88fd 28-Aug-2009 Steve Naroff <snaroff@apple.com> Lot's of little changes to get the C-based indexing API going...

Work in progress.


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