Argyrios Kyrtzidis
b3c16bad20
[libclang] Fix indexing of C++ bases in a C++ class.
...
llvm-svn: 146068
2011-12-07 20:44:15 +00:00
Argyrios Kyrtzidis
520028802c
[libclang] Introduce CXIdxEntityLanguage that indicates the language
...
of an indexed entity.
llvm-svn: 146067
2011-12-07 20:44:12 +00:00
Argyrios Kyrtzidis
1a10f29b2f
[libclang] When indexing a field in a C++ class, return an entity
...
of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503.
llvm-svn: 145859
2011-12-05 22:05:28 +00:00
Argyrios Kyrtzidis
f2d99b0d38
[libclang] Create a diagnostic set to pass at the end of indexing.
...
llvm-svn: 145557
2011-12-01 02:42:50 +00:00
Bob Wilson
bd0fbe86c5
Install c-index-test and clang-c/Index.h as internal files. rdar://10217046
...
Specify that these files should be installed to the optional internal
install location as specified by configure's --with-internal-prefix.
If that option is not used, they'll be installed to the default prefix
as before.
llvm-svn: 145235
2011-11-28 08:03:54 +00:00
Argyrios Kyrtzidis
b11f5a4cbb
[libclang] Indexing API: If the client requested to get a CXTranslationUnit after
...
indexing, honor all the TU options.
llvm-svn: 145229
2011-11-28 04:56:00 +00:00
Argyrios Kyrtzidis
4c910b1475
[libclang] Indexing API: Support C++ symbols.
...
llvm-svn: 145058
2011-11-22 07:24:51 +00:00
NAKAMURA Takumi
2a4859aeff
c-index-test.c: Fix syntax according to C.
...
llvm-svn: 144947
2011-11-18 00:51:03 +00:00
Argyrios Kyrtzidis
effdbf55ac
[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.
llvm-svn: 144942
2011-11-18 00:26:51 +00:00
Argyrios Kyrtzidis
df15c20979
[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.
llvm-svn: 144765
2011-11-16 02:35:05 +00:00
Argyrios Kyrtzidis
e4acd23f0b
[libclang] Indexing API: if the CXIndexOpt_OneRefPerFile option is set, only report one reference
...
per file.
llvm-svn: 144763
2011-11-16 02:34:59 +00:00
Argyrios Kyrtzidis
d992e14394
[libclang] Introduce a new function to apply the indexing callbacks on an existing
...
CXTranslationUnit, mainly to be used for indexing a PCH.
llvm-svn: 144623
2011-11-15 06:20:16 +00:00
Argyrios Kyrtzidis
86acd72bd2
[libclang] Slight changes to the indexing API and bigger internal changes for it.
...
llvm-svn: 144577
2011-11-14 22:39:19 +00:00
Argyrios Kyrtzidis
70480496c8
[libclang] Move the check for errors in c-index-test before the TU gets disposed.
...
llvm-svn: 144514
2011-11-13 23:39:14 +00:00
Argyrios Kyrtzidis
e74e8222ee
[libclang] for c-index-test, check for CINDEXTEST_FAILONERROR when doing -test-load-source-reparse
...
llvm-svn: 144509
2011-11-13 22:08:33 +00:00
Argyrios Kyrtzidis
3e429e7cc4
[libclang] Further simplify the indexing API.
...
That stuff can be added later on if we need them.
Also add some const goodness.
llvm-svn: 144446
2011-11-12 02:16:30 +00:00
Benjamin Kramer
b9af5f6eff
Silence compiler warning.
...
llvm-svn: 144386
2011-11-11 14:13:03 +00:00
Ted Kremenek
a0e32fc8b6
[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.
llvm-svn: 144349
2011-11-11 00:46:43 +00:00
Argyrios Kyrtzidis
7519c5e440
[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.
llvm-svn: 144343
2011-11-11 00:23:36 +00:00
NAKAMURA Takumi
27dd3964ac
c-index-test.c: Fix a comment style. /* It is C source. */
...
llvm-svn: 144274
2011-11-10 10:07:57 +00:00
NAKAMURA Takumi
77d9739249
c-index-test.c: Fix syntax. It is C source.
...
llvm-svn: 144272
2011-11-10 09:30:15 +00:00
Ted Kremenek
d010ba4729
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.
llvm-svn: 144269
2011-11-10 08:43:12 +00:00
Argyrios Kyrtzidis
8c25804ce1
[libclang] For "c-index-test -index-file", print out the names of the callbacks.
...
llvm-svn: 143779
2011-11-05 04:03:35 +00:00
Argyrios Kyrtzidis
7ca77357ce
[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.
llvm-svn: 143606
2011-11-03 02:20:36 +00:00
Argyrios Kyrtzidis
cb373e3f31
[libclang] For c-index-test disable caching of code completion results if
...
the CINDEXTEST_COMPLETION_NO_CACHING environment variable is present.
llvm-svn: 143604
2011-11-03 02:20:25 +00:00
Argyrios Kyrtzidis
a109e00bba
[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.
llvm-svn: 143243
2011-10-28 22:54:36 +00:00
Argyrios Kyrtzidis
9006807dcd
[libclang] Don't use C++-style comments in c-index-test.c.
...
llvm-svn: 142590
2011-10-20 17:21:46 +00:00
Argyrios Kyrtzidis
0c7735e525
[libclang] Index implicit property references.
...
llvm-svn: 142355
2011-10-18 15:50:50 +00:00
Argyrios Kyrtzidis
1c7dcd04b8
[libclang] When printing the diagnostic print it with a new line.
...
llvm-svn: 142354
2011-10-18 15:13:14 +00:00
Argyrios Kyrtzidis
317ebfe18e
Try fixing MSVC compiler errors.
...
llvm-svn: 142289
2011-10-17 22:12:24 +00:00
Argyrios Kyrtzidis
dc199a3152
[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.
llvm-svn: 142233
2011-10-17 19:48:19 +00:00
Erik Verbruggen
98ea7f6737
Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations to
...
retrieve annotations from completion string.
llvm-svn: 141953
2011-10-14 15:31:08 +00:00
Erik Verbruggen
338b55cc73
Fixed GCC (C90) and Clang warnings.
...
llvm-svn: 141281
2011-10-06 11:38:08 +00:00
Erik Verbruggen
2e657ffd8e
Added CXAvailability_NotAccessible to indicate that a declaration is available, but not accessible from the current code completion context.
...
llvm-svn: 141278
2011-10-06 07:27:49 +00:00
Argyrios Kyrtzidis
cddafd3969
[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
llvm-svn: 141277
2011-10-06 07:00:54 +00:00
NAKAMURA Takumi
37a4674fdc
Install c-index-test also on CMake build, following up r140681.
...
llvm-svn: 140694
2011-09-28 10:50:23 +00:00
Ted Kremenek
7f01c7b5f1
Install c-index-test as part of install-clang-c Makefile rule.
...
llvm-svn: 140681
2011-09-28 04:39:41 +00:00
Argyrios Kyrtzidis
4cdfcae75d
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
llvm-svn: 140519
2011-09-26 08:01:41 +00:00
Argyrios Kyrtzidis
3405baa3f0
[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.
llvm-svn: 139511
2011-09-12 18:09:31 +00:00
Matt Beaumont-Gay
d6238f4717
Fix type mismatch in initialization (caught by -Wliteral-conversion)
...
llvm-svn: 138736
2011-08-29 16:37:29 +00:00
Douglas Gregor
3f35bb2d15
Add a new libclang API to return a CXCompletionString for an arbitrary
...
cursor, from Connor Wakamo! Addresses <rdar://problem/9087798>.
llvm-svn: 136911
2011-08-04 20:04:59 +00:00
Douglas Gregor
ea777403f9
Add new libclang API, clang_codeCompleteGetObjCSelector(), which
...
provides the partial Objective-C selector used in a code
completion. From Connor Wakamo!
llvm-svn: 136084
2011-07-26 15:24:30 +00:00
Douglas Gregor
c1679ecf3b
Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
...
a cursor reference, from Erik Verbruggen!
llvm-svn: 135920
2011-07-25 17:48:11 +00:00
Douglas Gregor
63745d5935
New libclang API to expose container type for code completion, from
...
Connor Wakamo!
llvm-svn: 135651
2011-07-21 01:05:26 +00:00
Chandler Carruth
de81fc8557
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.
llvm-svn: 135141
2011-07-14 09:02:10 +00:00
Argyrios Kyrtzidis
dd76300464
Fix linker problem in buildbot.
...
llvm-svn: 134849
2011-07-09 22:35:06 +00:00
Douglas Gregor
2132584d36
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!
llvm-svn: 134615
2011-07-07 16:03:39 +00:00
Francois Pichet
abcfbecf39
MSVC doesn't like mixing declarations and statements in a C file.
...
llvm-svn: 134550
2011-07-06 22:09:44 +00:00
Douglas Gregor
30c80fa3eb
libclang: Allow callers of clang_saveTranslationUnit() to distinguish
...
between different classes of errors. Addresses most of
<rdar://problem/9660328>.
llvm-svn: 134495
2011-07-06 16:43:36 +00:00
Chandler Carruth
5dea0dc575
Remove ARCMigrate from more builds that it isn't needed in now that the
...
layering problem has been addressed.
llvm-svn: 133217
2011-06-16 23:53:28 +00:00