History log of /external/clang/tools/c-index-test/c-index-test.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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