Mike Stump
904ad90bc8
Set up include paths for VC++ and Cygwin headers, along with the
...
existing MinGW headers, plus the newer 4.4.0 version. Patch by John
Thompson.
llvm-svn: 83594
2009-10-08 23:29:47 +00:00
Douglas Gregor
084a654334
Make sure that c-index-test links as a C++ executable
...
llvm-svn: 83335
2009-10-05 22:29:42 +00:00
Douglas Gregor
629f4811a0
Make sure that libCIndex links as a C++ library
...
llvm-svn: 83331
2009-10-05 22:25:29 +00:00
Eric Christopher
c2ac4f020b
Fix C90 compile warning about mixed declarations and code.
...
llvm-svn: 83327
2009-10-05 21:33:42 +00:00
Steve Naroff
d7eb7179a2
- Fix assert in clang_getCursorDecl (having to do with recently added ObjC_ProtocolRef).
...
- Make sure CHECK: lines in test case match the expected output.
llvm-svn: 83316
2009-10-05 17:58:19 +00:00
Rafael Espindola
e7178953f9
Add a -nostdclanginc flag to clang-cc that prevents it from searching
...
its own binary-relative headers. Useful when using clang's preprocessor
with gcc.
llvm-svn: 83302
2009-10-05 13:12:17 +00:00
Steve Naroff
a6c56bb849
Add support for class and protocol references.
...
llvm-svn: 83186
2009-10-01 00:31:07 +00:00
Argyrios Kyrtzidis
419e38bbe2
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.
...
llvm-svn: 83099
2009-09-29 19:45:58 +00:00
Argyrios Kyrtzidis
4cbe85904c
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
...
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
2009-09-29 19:44:27 +00:00
Douglas Gregor
63b3556c9c
Set GNUMode only for the "gnu" language standard options, from Ken Dyck!
...
llvm-svn: 83064
2009-09-29 14:42:43 +00:00
Daniel Dunbar
73b6b4e1a3
Disable c-index-test on MSVC until someone figures out the real problem.
...
llvm-svn: 82830
2009-09-26 01:21:38 +00:00
Steve Naroff
43b118fc2c
Fix cut/paste error resulting in bad column info.
...
llvm-svn: 82810
2009-09-25 22:15:54 +00:00
Steve Naroff
2676089407
Add clang_getDeclSource().
...
llvm-svn: 82807
2009-09-25 21:45:39 +00:00
Steve Naroff
63f475a212
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)
llvm-svn: 82798
2009-09-25 21:32:34 +00:00
Douglas Gregor
43bc1a7483
CMake build support for libCIndex and c-index-test. The indexing tests
...
are now running properly from within CMake.
llvm-svn: 82755
2009-09-25 06:35:15 +00:00
Douglas Gregor
9e84d88d27
Hide clang-wpa executable behind a CMake variable so it won't be built by default
...
llvm-svn: 82751
2009-09-25 05:41:21 +00:00
Steve Naroff
a7753c492e
Add test for C-based indexing API, using FileCheck utility.
...
llvm-svn: 82706
2009-09-24 20:03:06 +00:00
Chris Lattner
6d98ede7e8
wpa is an experiment, don't build it by default, it adds to build times due to everything it links in.
...
llvm-svn: 82704
2009-09-24 19:45:12 +00:00
Anders Carlsson
d934010557
Add a -dump-record-layouts argument to clang-cc.
...
llvm-svn: 82703
2009-09-24 18:54:49 +00:00
Steve Naroff
f99203abd0
Some minor cleanups...
...
llvm-svn: 82646
2009-09-23 20:00:53 +00:00
Steve Naroff
76b8f13fcb
More work to enable more exhaustive testing of the indexing API.
...
Next step: Add actual some test cases:-)
llvm-svn: 82636
2009-09-23 17:52:52 +00:00
Daniel Dunbar
5564ba743f
Push "clang-is-production" logic up to tools/driver, and make it hittable by
...
defining the CLANG_IS_PRODUCTION Makefile variable.
llvm-svn: 82583
2009-09-22 22:31:13 +00:00
Douglas Gregor
ea9b03e6e2
Replace the -code-completion-dump option with
...
-code-completion-at=filename:line:column
which performs code completion at the specified location by truncating
the file at that position and enabling code completion. This approach
makes it possible to run multiple tests from a single test file, and
gives a more natural command-line interface.
llvm-svn: 82571
2009-09-22 21:11:38 +00:00
Steve Naroff
66af1aecdb
- Implement support for various types of "refs" (initially to help test clang_getCursor()).
...
- Add missing prototypes for dispose functions.
llvm-svn: 82564
2009-09-22 19:25:29 +00:00
Daniel Dunbar
1da62f5723
This FIXME is done.
...
llvm-svn: 82509
2009-09-22 02:17:27 +00:00
Fariborz Jahanian
71848a3ff1
Removed -fobjc-newgc-api option. clang now conforms to
...
gcc-style write-barrier api only.
llvm-svn: 82493
2009-09-21 23:03:37 +00:00
Daniel Dunbar
26e37a77c6
Switch ProcessASTInputFile to still use ParseAST.
...
- Currently this requires us to fake an input file.
- This allows Sema to be keep all the logic for how to pull decls out of the external AST source and how to handle things like tentative definitions.
llvm-svn: 82432
2009-09-21 03:03:56 +00:00
Daniel Dunbar
7cd285f0fe
Change ASTUnit to take the Diagnostic as an argument, the client should have control of this.
...
llvm-svn: 82430
2009-09-21 03:03:39 +00:00
Daniel Dunbar
948062a592
Add Diagnostic to Indexer, and have it keep its own FileManager instead of taking an external reference (which was leaked in the case of the CIndex library).
...
llvm-svn: 82429
2009-09-21 03:03:22 +00:00
Chris Lattner
78765c36de
switch command line 'parse' methods to use StringRef for efficiency, which
...
is also required for an llvm-side change.
llvm-svn: 82344
2009-09-20 00:39:15 +00:00
Douglas Gregor
2436e7116b
Initial implementation of a code-completion interface in Clang. In
...
essence, code completion is triggered by a magic "code completion"
token produced by the lexer [*], which the parser recognizes at
certain points in the grammar. The parser then calls into the Action
object with the appropriate CodeCompletionXXX action.
Sema implements the CodeCompletionXXX callbacks by performing minimal
translation, then forwarding them to a CodeCompletionConsumer
subclass, which uses the results of semantic analysis to provide
code-completion results. At present, only a single, "printing" code
completion consumer is available, for regression testing and
debugging. However, the design is meant to permit other
code-completion consumers.
This initial commit contains two code-completion actions: one for
member access, e.g., "x." or "p->", and one for
nested-name-specifiers, e.g., "std::". More code-completion actions
will follow, along with improved gathering of code-completion results
for the various contexts.
[*] In the current -code-completion-dump testing/debugging mode, the
file is truncated at the completion point and EOF is translated into
"code completion".
llvm-svn: 82166
2009-09-17 21:32:03 +00:00
Steve Naroff
3aa2d7300b
Add clang_disposeTranslationUnit() and clang_disposeIndex().
...
llvm-svn: 82154
2009-09-17 18:33:27 +00:00
Daniel Dunbar
e9fee8a361
Initial support for code generation from .ast files.
...
- Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.
- Other things like 'clang-cc foo.ast -ast-dump' now work, as well.
llvm-svn: 82107
2009-09-17 00:48:13 +00:00
Daniel Dunbar
691b9337a6
clang-cc: Factor out code for creating one of the standard AST consumer actions.
...
llvm-svn: 82106
2009-09-17 00:48:00 +00:00
Daniel Dunbar
785d51c45b
Simplify.
...
llvm-svn: 82104
2009-09-17 00:47:46 +00:00
Daniel Dunbar
1188987e23
clang-cc: Remove -ObjC -ObjC++ handling from clang-cc.
...
llvm-svn: 82103
2009-09-17 00:47:27 +00:00
Fariborz Jahanian
a7fa6beb2e
Starting patch to generate more specific API for objc's
...
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082
2009-09-16 21:37:16 +00:00
Mike Stump
a1874a91b6
Be sure to use the correct version instead of the wrong one.
...
llvm-svn: 81925
2009-09-15 21:49:22 +00:00
Steve Naroff
54f22fb1de
- clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
...
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().
llvm-svn: 81908
2009-09-15 20:25:34 +00:00
Daniel Dunbar
4e97bc3ee7
Add -target-abi clang-cc option, currently unused.
...
llvm-svn: 81731
2009-09-14 00:02:12 +00:00
Chris Lattner
46d90f7b32
rewrite the parsing code for -miphoneos-version-min and
...
-mmacosx-version-min to work on llvm::Triple. Simplify
it to use x-'0' to parse single digit integer strings.
llvm-svn: 81646
2009-09-12 22:45:58 +00:00
Steve Naroff
e0064d2e95
Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.
...
llvm-svn: 81487
2009-09-11 00:12:01 +00:00
Fariborz Jahanian
2cde203392
Non fragile ABI for GNU runtime. Patch bu David Chisnall.
...
llvm-svn: 81462
2009-09-10 21:48:21 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
0da4a5dcab
Use llvm::sys::getHostTriple, not LLVM_HOSTTRIPLE.
...
llvm-svn: 81013
2009-09-04 17:43:10 +00:00
Steve Naroff
ef9618b75f
Implement accessors clang_getCursorKind(), clang_getCursorDecl().
...
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.
llvm-svn: 81004
2009-09-04 15:44:05 +00:00
Steve Naroff
c0683b909a
Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
...
llvm-svn: 80932
2009-09-03 18:19:54 +00:00
Steve Naroff
38c1a7ba12
- 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.
llvm-svn: 80921
2009-09-03 15:49:00 +00:00
Daniel Dunbar
3a0637b06b
Revert "Visit function/method bodies and issue callback for parameters and local
...
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.
llvm-svn: 80896
2009-09-03 05:59:50 +00:00
Daniel Dunbar
a77eaeb1e6
Add basic support for -pthread.
...
- Patch by David Chisnall, with PCH and Darwin support mixed in.
llvm-svn: 80883
2009-09-03 04:54:28 +00:00