Rafael Espindola
cf63c0d2d8
Use -std=gnu89 in tools/c-index-test/CMakeLists.txt
...
With the old use of -std=c89 off_t is not defined and the build fails.
This seems to be another variation of
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40278 .
llvm-svn: 198748
2014-01-08 11:44:42 +00:00
NAKAMURA Takumi
ac85179219
[CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each CMakeLists.txt.
...
llvm-svn: 196916
2013-12-10 12:40:37 +00:00
Argyrios Kyrtzidis
0e282ef868
[libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more future-proof.
...
Suggested by Alp Toker.
llvm-svn: 196591
2013-12-06 18:55:45 +00:00
Argyrios Kyrtzidis
5899e8916b
[c-index-test] For the '-remap-file' option use a comma for separator which is more
...
Windows friendly than the colon.
llvm-svn: 196529
2013-12-05 20:13:27 +00:00
Argyrios Kyrtzidis
9ef5775a94
[libclang] Record ranges skipped by the preprocessor and expose them with libclang.
...
Patch by Erik Verbruggen!
llvm-svn: 196487
2013-12-05 08:19:32 +00:00
Argyrios Kyrtzidis
011e6a5f44
[c-index-test] Enhance perform_test_reparse_source() to allow remapping a file
...
at a particular reparsing iteration.
Passing '-remap-file-1=from:to' will remap the files in the second iteration.
llvm-svn: 196486
2013-12-05 08:19:23 +00:00
Argyrios Kyrtzidis
a60d8ae09d
[c-index-test] For the '-remap-file=' option use ':' instead of ';' for separator.
...
lldb does not like semicolon as part of an option.
llvm-svn: 196485
2013-12-05 08:19:18 +00:00
Argyrios Kyrtzidis
adff3ae3c8
[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.
...
Patch by Che-Liang Chiou!
llvm-svn: 192493
2013-10-11 19:58:38 +00:00
NAKAMURA Takumi
6dd203288d
{c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
...
llvm-svn: 188621
2013-08-18 03:48:57 +00:00
Enea Zaffanella
476f38a0c2
Revert commit 186833 (no longer needed after the fix in 186859).
...
llvm-svn: 186872
2013-07-22 20:58:30 +00:00
NAKAMURA Takumi
087f926a24
c-index-test.c: Let this C89-compliant since r186817.
...
warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions]
llvm-svn: 186833
2013-07-22 15:59:52 +00:00
NAKAMURA Takumi
80e373e44f
c-index-test/CMakeLists.txt: Suggest -isystem to include libxml2 with include_directories(SYSTEM).
...
llvm-svn: 185928
2013-07-09 11:14:30 +00:00
NAKAMURA Takumi
b538ac6830
c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
...
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.
FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
2013-07-09 11:14:24 +00:00
Argyrios Kyrtzidis
7b50fc520f
[libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declaration was affected by "@optional"
...
rdar://14348525.
llvm-svn: 185722
2013-07-05 20:44:37 +00:00
Reid Kleckner
898229ab4b
[Driver] Refactor clang driver to use LLVM's Option library
...
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere
As discussed in the review, this change includes using directives in
header files. I'll make follow up changes to remove those in favor of
name specifiers.
Reviewers: espindola
Differential Revision: http://llvm-reviews.chandlerc.com/D975
llvm-svn: 183989
2013-06-14 17:17:23 +00:00
Dmitri Gribenko
62770bea4b
libclang: add a function to check whether a member function is pure virtual
...
Patch by Seth Fowler.
llvm-svn: 182139
2013-05-17 18:38:35 +00:00
Argyrios Kyrtzidis
12fdb9e34b
[libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.
...
rdar://13743084
llvm-svn: 180643
2013-04-26 22:47:49 +00:00
Argyrios Kyrtzidis
d3afa0c7fb
[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.
...
The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.
llvm-svn: 180635
2013-04-26 21:33:40 +00:00
Argyrios Kyrtzidis
23814e4f49
[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the given cursor is a variadic function or method.
...
rdar://13667150
llvm-svn: 179819
2013-04-18 23:53:05 +00:00
Argyrios Kyrtzidis
9d9bc01e42
[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and
...
parameter types in an ObjC method declarations.
rdar://13676977
llvm-svn: 179816
2013-04-18 23:29:12 +00:00
Argyrios Kyrtzidis
9adfd8aabb
[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the written attributes in a property declaration.
...
rdar://13684512
llvm-svn: 179803
2013-04-18 22:15:49 +00:00
Argyrios Kyrtzidis
1ab09cc883
[libclang] Have clang_getCXXAccessSpecifier() also return the access control of a C++ declaration within its parent scope.
...
Suggested by Stefan Seefeld.
llvm-svn: 179297
2013-04-11 17:02:10 +00:00
Argyrios Kyrtzidis
e822f58db4
[libclang] Expose record layout info via new libclang functions:
...
clang_Type_getAlignOf
clang_Type_getSizeOf
clang_Type_getOffsetOf
clang_Cursor_isBitField
Patch by Loïc Jaquemet!
llvm-svn: 179251
2013-04-11 01:20:11 +00:00
Argyrios Kyrtzidis
bcc8a5a70a
[c-index-test] Enable 'display diagnostics' when using the -test-load functionality.
...
llvm-svn: 179123
2013-04-09 20:29:24 +00:00
Argyrios Kyrtzidis
3c5305c15e
[Modules] Resolve top-headers of modules lazily.
...
This allows resolving top-header filenames of modules to FileEntries when
we need them, not eagerly.
Note that that this breaks ABI for libclang functions
clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders
but this is fine because they are experimental and not widely used yet.
llvm-svn: 176975
2013-03-13 21:13:43 +00:00
Argyrios Kyrtzidis
1b5b1ce4f8
[libclang] Fix a test and a warning on windows.
...
Patch by Guy Benyei!
llvm-svn: 176806
2013-03-11 16:03:17 +00:00
Argyrios Kyrtzidis
503c83ad81
[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.
...
It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for
all the include directives in a particular file.
llvm-svn: 176682
2013-03-08 02:32:34 +00:00
Stefanus Du Toit
b331850194
Fix typos: [Dd]iagnosic -> [Dd]iagnostic
...
These all appear in comments or (ironically) diagnostics output.
llvm-svn: 176383
2013-03-01 21:41:22 +00:00
Dmitri Gribenko
0035372bb7
libclang: add clang_getTypeSpelling(CXType CT)
...
Adds a function clang_getTypeSpelling(CXType CT) that returns
a CXString containing the underlying type.
Patch by Ben Gertzfield.
llvm-svn: 175299
2013-02-15 21:15:49 +00:00
NAKAMURA Takumi
873a63ce19
libclang: Update comment about USEDLIBS in c-*-test/Makefile.
...
"Note that 'USEDLIBS' must include all of the core clang libraries when -static is given to linker on cygming."
llvm-svn: 173124
2013-01-22 04:11:33 +00:00
NAKAMURA Takumi
a589b96041
Add bitreader to LINK_COMPONENTS in users of libclang, c-arcmt-test and c-index-test.
...
They don't link cygclang.dll, but libclang.a on cygwin.
llvm-svn: 172980
2013-01-20 14:53:49 +00:00
NAKAMURA Takumi
f827eb629d
c-index-test/Makefile: Add clangFormat to USEDLIBS for libclang-unavailable hosts.
...
llvm-svn: 170693
2012-12-20 13:30:10 +00:00
NAKAMURA Takumi
393bf4c3c8
c-index-test/Makefile: Reformat.
...
llvm-svn: 170692
2012-12-20 13:30:05 +00:00
Argyrios Kyrtzidis
fdea813c4a
[c-index-test] Fix warnings about unused results from chdir().
...
Patch from Edwin Vane!
llvm-svn: 170366
2012-12-17 20:19:56 +00:00
NAKAMURA Takumi
92eb254c3c
[CMake] Move libxml2 stuff from clang to llvm/cmake.
...
llvm-svn: 170225
2012-12-14 18:30:20 +00:00
Argyrios Kyrtzidis
8b71bc7d6b
[libclang] Introduce a new indexing mode where we skip function bodies
...
that were already parsed in the same "indexing session".
An indexing session is defined as using the same CXIndexAction object
for multiple clang_indexSourceFile calls.
Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will
enable the mode where we try to skip bodies that were already parsed in
another translation unit.
If a function's body was skipped, the "flags" field in the CXIdxDeclInfo
structure will have "CXIdxDeclFlag_Skipped" bit was set.
llvm-svn: 169539
2012-12-06 19:41:16 +00:00
Argyrios Kyrtzidis
f75d498a3c
[c-index-test] Introduce '-index-compile-db' which accepts a compilation database file
...
and does an '-index-file' for all compile commands in the database.
llvm-svn: 169430
2012-12-05 21:53:37 +00:00
NAKAMURA Takumi
dfaed1bfde
c-index-test.c: Make C89-compliant.
...
llvm-svn: 169277
2012-12-04 15:32:03 +00:00
Dmitri Gribenko
b506ba1d79
libclang: Add a function to libclang for retrieving the bit width value
...
Patch by Jyun-Yan You.
llvm-svn: 169276
2012-12-04 15:13:46 +00:00
Dmitri Gribenko
9fcad0947c
Force C89 for c-index-test.c
...
MSVC supports only C89, so it is important to keep c-index-test.c
buildable with C89. However, Clang defaults to C99, so while building
Clang with Clang one can introduce C99 constructs into c-index-test.c
without noticing.
Thanks to Nakamura Takumi for helping with MSVC bits.
llvm-svn: 167561
2012-11-07 23:52:25 +00:00
Argyrios Kyrtzidis
58a1d90d6a
[c-index-test] Do install c-index-test because it's not just for tests,
...
it's also setup as 'INTERNAL_TOOL'.
llvm-svn: 167432
2012-11-06 02:12:21 +00:00
Argyrios Kyrtzidis
b26a24cca2
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
...
the receiver of an ObjC message expression.
rdar://12578643
llvm-svn: 167201
2012-11-01 02:01:34 +00:00
NAKAMURA Takumi
4deb9a9b11
c-index-test.c: Split a format string. [-Woverlength-strings]
...
FIXME: They are still long strings without formatter in printf(3)!
llvm-svn: 166636
2012-10-24 22:52:04 +00:00
Argyrios Kyrtzidis
e26c5571b2
[libclang] Add "-index-file-full" option that recursively indexes any imported
...
modules/PCH files.
llvm-svn: 166605
2012-10-24 18:29:15 +00:00
Argyrios Kyrtzidis
5e2ec486bb
[libclang] Invoke a ppIncludedFile callback when indexing implicit module imports.
...
llvm-svn: 166161
2012-10-18 00:17:05 +00:00
NAKAMURA Takumi
e259d912ab
c-index-test.c: /* Use C style comment. */
...
llvm-svn: 165797
2012-10-12 14:25:52 +00:00
Argyrios Kyrtzidis
8585f140bf
[libclang] Make sure the index_data.main_filename field is initialized
...
in c-index-test. index_enteredMainFile is not invoked when indexing a
module file.
llvm-svn: 165735
2012-10-11 19:38:23 +00:00
Argyrios Kyrtzidis
9f57186983
[libclang] Add tests for indexing modules and PCHs using modules.
...
llvm-svn: 165732
2012-10-11 19:00:44 +00:00
Argyrios Kyrtzidis
0db720f0dc
[libclang] Improve AST serialization done by ASTUnit::Save().
...
The ASTUnit needs to initialize an ASTWriter at the beginning of
parsing to fully handle serialization of a translation unit that
imports modules. Do this by introducing an option to enable it, which
corresponds to CXTranslationUnit_ForSerialization on the C API side.
llvm-svn: 165717
2012-10-11 16:05:00 +00:00
Argyrios Kyrtzidis
dc78f3e7a9
[libclang] Now that we have a CXModule object, pass it to the
...
importedASTFile indexing callback.
llvm-svn: 165281
2012-10-05 00:22:40 +00:00