Commit Graph

227 Commits

Author SHA1 Message Date
Douglas Gregor ca5b053920 Add some missing concurrency checks into libclang
llvm-svn: 114682
2010-09-23 18:47:53 +00:00
Douglas Gregor 0576ce730a Implement libclang API functions for retrieving the lexical and
semantic parents of the given cursor.

llvm-svn: 114587
2010-09-22 21:22:29 +00:00
Ted Kremenek 2f07563f47 Correctly register the class extension as the lexical DeclContext for ObjC methods declared with @property in class extensions.
This matches the behavior for setters.

Also pass the class extension to ProcessPropertyDecl as the lexical DeclContext, even when not redeclaring the @property.

This fixes the remaining issues in <rdar://problem/7410145>.

llvm-svn: 114477
2010-09-21 20:52:59 +00:00
Ted Kremenek 0030e1d3cd Fix indentation.
llvm-svn: 114394
2010-09-21 04:47:01 +00:00
Ted Kremenek c2eb0116cc Check for null ObjCInterfaceDecls returned from getClassInterface() when generating USRs. While I have no test case for this (could not create one), this shows up in crash reports. Tentatively fixes <rdar://problem/8452791>.
llvm-svn: 114392
2010-09-21 04:45:46 +00:00
Douglas Gregor 8af2ff89f7 Introduce a simple, substitution-based compression scheme for USRs, so
that redundant types don't result in super-long USRs. Fixes
<rdar://problem/8447875>.

llvm-svn: 114347
2010-09-20 20:37:39 +00:00
Douglas Gregor f9088c93be When traversing an InitListExpr, there may not be a syntactic form;
check for NULL and visit the InitListExpr we have if there is no
syntactic form.

llvm-svn: 114203
2010-09-17 20:26:51 +00:00
Douglas Gregor ae18530d03 Fix a silly typo and its pasteo. Thanks to Francois Pichet for noticing my mistake
llvm-svn: 114075
2010-09-16 13:54:00 +00:00
Michael J. Spencer 09476212de Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

llvm-svn: 113817
2010-09-13 23:54:41 +00:00
Douglas Gregor 16a2bdd6b0 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.

llvm-svn: 113805
2010-09-13 22:52:57 +00:00
Douglas Gregor c7a7d92ad2 Fix my silly sorting predicate. I hate integer-to-bool conversions
llvm-svn: 113656
2010-09-10 23:05:54 +00:00
Michael J. Spencer 0881f4a367 CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

llvm-svn: 113631
2010-09-10 21:13:16 +00:00
Sebastian Redl 4202c0f2a9 Define and implement CXXNoexceptExpr. Create it in Sema.
llvm-svn: 113623
2010-09-10 20:55:43 +00:00
Douglas Gregor a93ab66331 Add libclang support for label statements, gotos, and taking the
address of a label (GNU extension).

llvm-svn: 113564
2010-09-10 00:22:18 +00:00
Douglas Gregor d198047ef3 Add libclang visitation for C99 designated initializers.
llvm-svn: 113560
2010-09-09 23:28:23 +00:00
Douglas Gregor 0d4d88cf38 Add libclang visitation for __builtin_offsetof's components (fields
and array references).

llvm-svn: 113556
2010-09-09 23:10:46 +00:00
Douglas Gregor f3af311382 Teach libclang to walk the base and member initializers of a
constructor, in source order. Also introduces a new reference kind for
class members, which is used here (for member initializers) and will
also be used for designated initializers and offsetof.

llvm-svn: 113545
2010-09-09 21:42:20 +00:00
Douglas Gregor 9f0e1aa0f2 Simplify template instantiation for C++ exception declarations,
eliminating an unnecessary use of TemporaryBase in the process.

llvm-svn: 113500
2010-09-09 17:09:21 +00:00
Douglas Gregor 54e5b13a27 Add proper type-source information to UnaryTypeTraitExpr, including
libclang visitation.

llvm-svn: 113492
2010-09-09 16:14:44 +00:00
Douglas Gregor c9199f522f Clean up CMake dependencies
llvm-svn: 113489
2010-09-09 15:44:58 +00:00
Francois Pichet 5cc0a67f08 Fix warnings caused by new CXXUuidofExprClass enumerator.
llvm-svn: 113444
2010-09-08 23:47:05 +00:00
Douglas Gregor 2b88c115f9 Provide proper type-source location information for
CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and
CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the
process.

llvm-svn: 113319
2010-09-08 00:15:04 +00:00
Douglas Gregor 0744ef6371 Improve source-location information for CXXNewExpr, by hanging on to
the TypeSourceInfo for the allocated type. Fixes PR7501.

llvm-svn: 113291
2010-09-07 21:49:58 +00:00
Douglas Gregor 09c0eb1510 Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!

llvm-svn: 113033
2010-09-03 23:30:36 +00:00
Douglas Gregor 901a0fabfc Implement libclang visitation for UnresolvedMemberExpr. This is the
last of the C++-specific expressions where we have decent source
information in the AST already. In particular, various
object-construction expressions (CXXNewExpr, CXXTemporaryObjectExpr)
still have poor source-location information that needs to be addressed.

llvm-svn: 112981
2010-09-03 18:01:25 +00:00
Douglas Gregor 4583827e13 libclang visitation for CXXDependentScopeMemberExpr
llvm-svn: 112978
2010-09-03 17:35:34 +00:00
Douglas Gregor 4ae34afaf9 libclang visitation for DependentScopeDeclRefExpr
llvm-svn: 112975
2010-09-03 17:24:10 +00:00
Douglas Gregor f24eaee2b3 Teach libclang to visit OverloadExprs, so that we can reuse this
code. Also, teach it about explicitly-specified template arguments.

llvm-svn: 112884
2010-09-02 22:29:21 +00:00
Douglas Gregor 3ca46b4275 Add libclang visitation for UnresolvedLookupExprs
llvm-svn: 112879
2010-09-02 22:19:24 +00:00
Douglas Gregor 4edb2ff89f Add libclang visitation for C++ pseudo-destructor expressions.
llvm-svn: 112873
2010-09-02 22:09:03 +00:00
Douglas Gregor 6429f5cf29 Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.

llvm-svn: 112868
2010-09-02 21:50:02 +00:00
Douglas Gregor fd81cea70c Teach libclang not to recursive into default argument expressions
llvm-svn: 112866
2010-09-02 21:38:13 +00:00
Douglas Gregor 46af501065 Add libclang visitation for C++ typeid expressions.
llvm-svn: 112862
2010-09-02 21:20:16 +00:00
Douglas Gregor 32e4c861c8 In libclang, visit the nested-name-specifier and explicitly-specified template arguments of a MemberExpr.
llvm-svn: 112860
2010-09-02 21:07:44 +00:00
Douglas Gregor aac7c8106a Visit the nested-name-specifier and explicitly-specified template
arguments of a DeclRefExpr.

llvm-svn: 112854
2010-09-02 20:35:02 +00:00
Douglas Gregor 3335f48448 Implement basic visitation for nested name specifiers via libclang
cursors. Sadly, this visitation is a hack, because we don't have
proper source-location information for nested-name-specifiers in the
AST. It does improve on the status quo, however.

llvm-svn: 112837
2010-09-02 17:35:32 +00:00
Douglas Gregor d3f48bd3be 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.

llvm-svn: 112780
2010-09-02 00:07:54 +00:00
Douglas Gregor 06c7d2df9b Teach libclang to visit the default arguments of template parameters.
llvm-svn: 112734
2010-09-01 20:16:53 +00:00
Douglas Gregor a9aa29cf0b Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
  - Cursor visitation of the three AST nodes for using declarations
  - Proper source-range computation for these AST nodes
  - Using declarations have no USRs, since they don't actually declare
    any entities.

llvm-svn: 112730
2010-09-01 19:52:22 +00:00
Douglas Gregor 9dc243c3eb Improve libclang indexing support for class template specializations
in a few related ways:

  - Don't recurse into instantiations of templates.
  - Recurse into explicit specializations.
  - Visit the template arguments of an explicit specialization or
    explicit instantiation.
  - Include template specialization arguments in the USRs for class
    template specializations.

llvm-svn: 112720
2010-09-01 17:32:36 +00:00
Douglas Gregor 57879faf91 Make it clear that libclang does not modify the command-line arguments
it is given.

llvm-svn: 112717
2010-09-01 16:43:19 +00:00
Douglas Gregor 01a430134f Implement libclang support for using directives (cursor + visitation +
suppressing USRs). Also, fix up the source location information for
using directives so that the declaration location refers to the
namespace name.

llvm-svn: 112693
2010-09-01 03:07:18 +00:00
Douglas Gregor a89314e396 Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace. 

There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.

llvm-svn: 112676
2010-08-31 23:48:11 +00:00
Douglas Gregor f11309e194 Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.

Also, teach clang_CXXMethod_isStatic() about function templates.

llvm-svn: 112655
2010-08-31 22:12:17 +00:00
Douglas Gregor a23e8f7a0f Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.

llvm-svn: 112636
2010-08-31 20:37:03 +00:00
Douglas Gregor f96abb293a Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.

llvm-svn: 112629
2010-08-31 19:31:58 +00:00
Douglas Gregor 1fbaeb196b Add a libclang cursor kind, visitation support and USR support for C++
class templates. 

llvm-svn: 112627
2010-08-31 19:02:00 +00:00
Douglas Gregor 713602bb09 Implement basic support for indexing function templates in
libclang. This includes:
  - Cursor kind for function templates, with visitation logic
  - Cursor kinds for template parameters, with visitation logic
  - Visitation logic for template specialization types, qualified type
  locations
  - USR generation for function templates, template specialization
  types, template parameter types.

Also happens to fix PR7804, which I tripped across while testing.

llvm-svn: 112604
2010-08-31 17:01:39 +00:00
Douglas Gregor 12bca22e91 libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.

llvm-svn: 112600
2010-08-31 14:41:23 +00:00
Alexis Hunt 3b7918625c Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

llvm-svn: 112493
2010-08-30 17:47:05 +00:00
Alexis Hunt 79eb5469e0 Implement C++0x user-defined string literals.
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

llvm-svn: 112458
2010-08-29 21:26:48 +00:00
Ted Kremenek 378e93c210 Add source file I meant to include in my previous commit.
llvm-svn: 112303
2010-08-27 21:57:20 +00:00
Ted Kremenek ae9e221513 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>.

llvm-svn: 112296
2010-08-27 21:34:58 +00:00
Douglas Gregor 9704c75b1f Teach clang_codeComplete to always sort its code-completion results
llvm-svn: 112292
2010-08-27 21:13:41 +00:00
Douglas Gregor 67c692cc3d Implement code completion for @selector expressions
llvm-svn: 112186
2010-08-26 15:07:07 +00:00
Douglas Gregor 49f67ce4b3 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.

llvm-svn: 112180
2010-08-26 13:48:20 +00:00
Daniel Dunbar bef185c835 Revert r112149, "Move the sorting of code-completion results out of the main
path and ...", it is failing tests.

llvm-svn: 112161
2010-08-26 03:53:50 +00:00
Daniel Dunbar 60e3749181 Revert r112154, "Fix thinko in sorting operation", it depends on r112149 which
doth lay upon the chopping block.

llvm-svn: 112160
2010-08-26 03:53:44 +00:00
Douglas Gregor db967a58eb Fix thinko in sorting operation
llvm-svn: 112154
2010-08-26 02:54:05 +00:00
Douglas Gregor 78ecc499eb 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.

llvm-svn: 112149
2010-08-26 02:23:45 +00:00
Ted Kremenek a594082210 Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes.
llvm-svn: 112139
2010-08-26 01:42:22 +00:00
Douglas Gregor 1099865124 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?

llvm-svn: 112121
2010-08-26 00:30:24 +00:00
Ted Kremenek 65b2cc061d When annotating tokens, don't fallback to annotating with a null cursor for cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>.
llvm-svn: 112096
2010-08-25 22:16:02 +00:00
Douglas Gregor ebb7c84891 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.

llvm-svn: 112095
2010-08-25 22:15:42 +00:00
John McCall 276321a9ec Teach Sema to live without CodeCompleteConsumer.h.
llvm-svn: 112028
2010-08-25 06:19:51 +00:00
Ted Kremenek cc7f215872 USRs for class extensions should "mangle" in the location of the extension. (<rdar://problem/8350262>)
llvm-svn: 111991
2010-08-24 23:13:41 +00:00
Douglas Gregor f757a12dfc 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.

llvm-svn: 111858
2010-08-23 23:00:57 +00:00
Daniel Dunbar f10f9bec83 libclang: Print more information when recovering from crashes in
clang_parseTranslationUnit.

llvm-svn: 111855
2010-08-23 22:35:34 +00:00
Eli Friedman 04831926ec Detabify.
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
John McCall 8b0666cf79 Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.

llvm-svn: 111667
2010-08-20 18:27:03 +00:00
Douglas Gregor b97b666c47 When performing code-completion in the presence of a preamble, make
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.

llvm-svn: 111597
2010-08-20 00:59:43 +00:00
Daniel Dunbar 77af1c564e libclang: Execute clang_codeCompleteAt() inside a crash recovery context.
- Test case is disabled for now, because something isn't write with file
   remapping.

llvm-svn: 111581
2010-08-19 23:44:10 +00:00
Daniel Dunbar ce26b3ff2b libclang/Darwin: Always set the compatibility version in the dylib.
llvm-svn: 111578
2010-08-19 23:44:02 +00:00
Sebastian Redl d44cd6adba More PCH -> AST renaming.
llvm-svn: 111472
2010-08-18 23:57:06 +00:00
Alexis Hunt dcfba7b35b Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

 - The constructor arguments are a SourceLocation and a Context&,
   followed by the attributes arguments in the order that they were
   defined in Attr.td

 - Every argument in Attr.td has an appropriate accessor named getFoo,
   and there are sometimes a few extra ones (such as to get the length
   of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

llvm-svn: 111455
2010-08-18 23:23:40 +00:00
Daniel Dunbar 79acdd9402 libclang: Put clang_reparseTranslationUnit inside a crash recovery context.
llvm-svn: 111451
2010-08-18 23:09:31 +00:00
Daniel Dunbar 583c3b775e libclang: Put clang_parseTranslationUnit inside a crash recovery context.
llvm-svn: 111387
2010-08-18 18:43:17 +00:00
Daniel Dunbar c91f2fff98 libclang: Implicitly enable crash recovery when using the libclang APIs. We may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off.
llvm-svn: 111386
2010-08-18 18:43:14 +00:00
Douglas Gregor b13f5d99af Simplify FixItHint by eliminated the unnecessary InsertionLoc
location. Patch by Eelis van der Weegen!

llvm-svn: 111362
2010-08-18 14:24:02 +00:00
Sebastian Redl 135bcc791b Reintroduce the serialization library, with fixed dependencies.
llvm-svn: 111279
2010-08-17 20:43:28 +00:00
Douglas Gregor 600c4f6d84 Remove the last bit of the Clang Serialization library, for now
llvm-svn: 111267
2010-08-17 19:00:27 +00:00
Dan Gohman b1e20869a2 Add the clangSerialization library to libclang.
llvm-svn: 111261
2010-08-17 18:07:30 +00:00
Douglas Gregor 3998219789 Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters. 

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.

llvm-svn: 111093
2010-08-15 06:18:01 +00:00
Ted Kremenek aa01481d78 Always recurse into sub-cursors when annotating tokens, as this information is used for annotating macro arguments. This finishes up <rdar://problem/8044584>.
llvm-svn: 111066
2010-08-14 02:50:46 +00:00
Ted Kremenek f4ade0ae3f As a heuristic, annotate tokens (via clang_annotateTokens) that are the arguments of a macro instantiation using the closest cursor with the same spelling location. Because macro arguments can get token pasted in any arbitrary order, we use the annotation map to paper over the token -> cursor annotations during our post-processing stage. This fixes most of <rdar://problem/8044584>, but still doesn't work for assert().
llvm-svn: 111062
2010-08-14 01:14:06 +00:00
Douglas Gregor b14904c4a8 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.

llvm-svn: 111051
2010-08-13 22:48:40 +00:00
Douglas Gregor 6bb92ecc0a Add an options parameter to clang_saveTranslationUnit, because we'll want it later
llvm-svn: 111016
2010-08-13 15:35:05 +00:00
Douglas Gregor e938668003 Implement clang_saveTranslationUnit(), which saves a translation unit
into a PCH/AST file.

llvm-svn: 111006
2010-08-13 05:36:37 +00:00
Douglas Gregor 00c37ef021 Once code completion has completed, pass a "completion context" on to
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.

llvm-svn: 110858
2010-08-11 21:23:17 +00:00
Douglas Gregor de05118c84 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.

llvm-svn: 110811
2010-08-11 15:58:42 +00:00
Douglas Gregor e68aaca766 Teach the libclang cursor visitor to walk into the type information
provided by __builtin_types_compatible_p and __builtin_va_arg
expressions, now that Abramo has added proper type-source information
to those expressions.

llvm-svn: 110681
2010-08-10 15:02:34 +00:00
Douglas Gregor 4a47bca47d 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.

llvm-svn: 110613
2010-08-09 22:28:58 +00:00
Douglas Gregor 8ef4c807a1 Minor libclang tweaks
llvm-svn: 110599
2010-08-09 21:00:09 +00:00
Douglas Gregor 028d3e4d0f Use precompiled preambles for in-process code completion.
llvm-svn: 110596
2010-08-09 20:45:32 +00:00
Douglas Gregor efcc6da97d Don't pass -avoid-version to Darwin linker
llvm-svn: 110438
2010-08-06 11:08:45 +00:00
Douglas Gregor b68bc59a2d 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.

llvm-svn: 110319
2010-08-05 09:09:23 +00:00
Douglas Gregor d8a5dba9c2 When performing in-process code completion, don't free the remapped
file buffers until the code completion results are destroyed;
diagnostics may end up referring into the source.

llvm-svn: 110216
2010-08-04 17:07:00 +00:00
Douglas Gregor 8e984da800 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).

llvm-svn: 110210
2010-08-04 16:47:14 +00:00
Douglas Gregor e9db88f991 When using a precompiled preamble, keep track of the top-level
declarations that we saw when creating the precompiled preamble, and
provide those declarations in addition to the declarations parsed in
the main source file when traversing top-level declarations. This
makes the use of precompiled preambles a pure optimization, rather
than changing the semantics of the parsed translation unit.

llvm-svn: 110131
2010-08-03 19:06:41 +00:00
Douglas Gregor b1cf1ca19a Add Darwin dylib versioning support to libclang when build with CMake.
llvm-svn: 110062
2010-08-02 20:52:32 +00:00