History log of /external/clang/lib/Sema/CodeCompleteConsumer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
d1f09b482b3874be07dfe9dd24bfad98915989c3 31-Jan-2013 Douglas Gregor <dgregor@apple.com> Allow the computation of the base priority for a declaration code completion result to consider the completion context

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
89cf425f1136f8d24a64ed94450e488b6794dfa4 23-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Use 'const Decl *' throughout code completion in Sema


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
526d24444c91404dc4165b141e5ec095125c1bc8 26-Sep-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Remove the ParentKind cursor kind from code-completion results.

This is to reduce dependency to cursors for the code-completion results.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
d99ef536b241071b6f4c01db6525dc03242ac30b 02-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add a new libclang completion API to get brief documentation comment that is
attached to a declaration in the completion string.

Since extracting comments isn't free, a new code completion option is
introduced.

A new code completion option that enables including brief comments
into CodeCompletionString should be a, err, code completion option.
But because ASTUnit caches global declarations during parsing before
even completion consumer is created, the option is duplicated as a
translation unit option (in both libclang and ASTUnit, like the option
to cache code completion results).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e5f8372b5dccf5894f0263d018599c14d8f31273 20-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Bitpack CodeCompletionResults.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
28a83f57003469fb615ad27dd34bcf5b0a10da8c 10-Apr-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [code-complete] Introduce CodeCompletionTUInfo which will be used for caching
code-completion related strings specific to a translation unit (ASTContext and related data)

CodeCompletionAllocator does such limited caching, by caching the name assigned
to a DeclContext*, but that is not the appropriate place since that object has
a lifetime that can extend beyond that of an ASTContext.

Introduce CodeCompletionTUInfo which will be always tied to a translation unit
to do this kind of caching and move the caching of CodeCompletionAllocator into this
object, and propagate it to all the places where it will be needed.

The plan is to extend the caching where appropriate, using CodeCompletionTUInfo,
to avoid re-calculating code-completion strings.

Part of rdar://10796159.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
ba1030698dbc276db86b11c5329a1edee8a1805e 28-Mar-2012 Douglas Gregor <dgregor@apple.com> Introduce a new libclang API to determine the parent context of a code
completion item. For example, if the code completion itself represents
a declaration in a namespace (say, std::vector), then this API
retrieves the cursor kind and name of the namespace (std). Implements
<rdar://problem/11121951>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
1eb18afd931f626713c066ede0707ceb522fa061 26-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Move CodeCompletionBuilder's chunk adding methods out of line.

This makes sense because chunk's ctor is also out of line and simplifies considerably
when inlined with a constant parameter. Shrinks clang on i386-linux-Release+Asserts by 65k.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
8e42f2782338666ec67eab2e709e18b92060eeba 17-Mar-2012 Douglas Gregor <dgregor@apple.com> When determining the availability of an enum constant, also consider
the availability of the enumeration type itself. Fixes
<rdar://problem/10996386>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
8fe83e1df954d72c0f4ffc15d20a5222ec151c21 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move a method from IdentifierTable.h out of line and remove the SmallString include.

Fix all the transitive include users.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
7530c034c0c71a64c5a9173206d9742ae847af8b 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
375bb1413c041055262c8a416f20d10474a5eda9 27-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
b8989f27f116ff2400e92a52c067a69846119eb5 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Change operator<< for raw_ostream and NamedDecl to take a reference instead of a pointer.

Passing a pointer was a bad idea as it collides with the overload for void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
0f91c8ccb398be2bd40dc402309bd79737542396 30-Jul-2011 Douglas Gregor <dgregor@apple.com> When performing code completion after at @interface, allow both
already-defined and forward-declared results. Already-defined results
are fine because they could be the start of a category. Fixes
<rdar://problem/9811691>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
5c722c7020b33da57090422b854072258a50b3f0 19-Feb-2011 Douglas Gregor <dgregor@apple.com> When code-completing a case statement for a switch on a value of
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
577cdfdb20840350e841a483df630237326126d5 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement code completion results for the Objective-C Key-Value Coding
(KVC) and Key-Value Observing (KVO) protocols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
6159d0fe2d40708b5a3caab91c8292253894ebf3 02-Feb-2011 Douglas Gregor <dgregor@apple.com> Revert r124704, which uniqued code-completion strings. The space
savings of 25% sounds impressive, except that this amounted to only
about 360k in our standard "large" completion result set (40,000
results). Since code completion is performance-sensitive, the 4%
slowdown due to uniquing outweighs the 360k benefit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e349d2c61256f11180b7112ab592b4ae700f3dcf 02-Feb-2011 Douglas Gregor <dgregor@apple.com> Unique code-completion strings. On Cocoa.h, this costs us about 4% in
speed but saves us about 25% of the memory usage for strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
dae687575010c9c49a4b552f5eef82cd6279d9ac 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have
associated state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
218937c13ef5b0625a70aad41ca7a92da9278bd2 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
a9f4f620daf073805b89e893afcdc5eb7a9bdc50 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate the (de-)serialization of code completion results, now that
libclang does not support out-of-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
52779fb71795534d0447f6f4d4a6f6a7b09c4639 24-Sep-2010 Douglas Gregor <dgregor@apple.com> Synchronize globally-cached code completion results with the results
provided when the optimization is disabled. In particular, split
the completion context CCC_Other into two contexts: CCC_Other, which
means that it's an undisclosed context for which any other results are
unwelcome, and CCC_Recovery, which is used in recovery cases.

Since we're now using the completion context within the completion
results builder, make sure that it's always set to something.

Fixes <rdar://problem/8470644>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
6f942b2cabf32b96f9901b889d8e44a34e0e7c62 21-Sep-2010 Douglas Gregor <dgregor@apple.com> Add code completion for C++ constructors wherever we see the class (or
class template) and are in a context where we can have a value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
97fe61ca1749110c28eb4570a710c8983711c7b3 18-Sep-2010 Douglas Gregor <dgregor@apple.com> Give the Objective-C _cmd an "unlikely" code completion priority; it's
very rarely used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e8d7bebc0dd037516dd695ee1ac2eb0923753b46 04-Sep-2010 Douglas Gregor <dgregor@apple.com> Synchronize code-completion cursor kinds with indexing cursor
kinds. How shameful that this code was duplicated!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
ff67789ee51a0eb55eeb07397de92c6c60ebe9d4 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Simplify code-completion result sorting a bit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
721f359a350059a81945baa08f63b2e5feceb044 25-Aug-2010 Douglas Gregor <dgregor@apple.com> When combining the code-completion results from Sema long with the
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
0a2c5e256abb4dc031c21fe4dc92c4f3afe9947c 25-Aug-2010 John McCall <rjmccall@apple.com> Teach Sema to live without CodeCompleteConsumer.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
2a7fb27913999d132cf9e10e03dc5271faa2e9d3 25-Aug-2010 John McCall <rjmccall@apple.com> Move more stuff out of Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
7cd088e519d7e6caa4c4c12db52e0e4ae35d25c2 24-Aug-2010 John McCall <rjmccall@apple.com> Struggle mightily against header inclusion in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
e737f5041a36d0befb39ffeed8d50ba15916d3da 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e6b1bb6e7fe906d164637ca33503b8fafdbc99e5 11-Aug-2010 Douglas Gregor <dgregor@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
6bdeb4024a7422bbd61fad403383af76b0581d45 26-Jul-2010 Dan Gohman <gohman@apple.com> Minor code simplification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
dc8453422bec3bbf70c03920e01498d75783d122 25-May-2010 Douglas Gregor <dgregor@apple.com> Improve code completion in failure cases in two ways:
1) Suppress diagnostics as soon as we form the code-completion
token, so we don't get any error/warning spew from the early
end-of-file.
2) If we consume a code-completion token when we weren't expecting
one, go into a code-completion recovery path that produces the best
results it can based on the context that the parser is in.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
900fc6388e803868a34b9483510c345e9b49d7eb 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e8f5a1710a7738deff40e10efcd05b1bd6af184f 07-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement code completion for Objective-C method declarations and
definitions, e.g., after

-

or

- (id)

we'll find all of the "likely" instance methods that one would want to
declare or define at this point. In the latter case, we only produce
results whose return types match "id".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
09d9fa1933499cb2808cd97b2db16ee11a990ef9 05-Apr-2010 Douglas Gregor <dgregor@apple.com> Code completion results that refer to macros now get the cursor kind
of macro definitions when passed to CIndex. Add test for code
completion of macros via CIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
a48b2846153dc1f6c35f9e8812975a661ab1bc79 08-Mar-2010 Duncan Sands <baldrick@free.fr> Remove unused headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
ab0b4f1d66de54b4c3102b96d56964510361ba7d 14-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve the sorting of code-completion results. We now always sort by
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
2b4074f1d3919e77cb33ca49c960521dea27afab 01-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
85b4521e34dcd4a0a4a1f0819e1123128e5a3125 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
54f016150acf7e0d4dab702d3d7d5e40ba1fdebf 19-Nov-2009 Douglas Gregor <dgregor@apple.com> Improve code-completion results for the flags in an @property
declaration by providing patterns for "getter = <method>" and "setter
= <method>". As part of this, invented a new "pattern" result kind
that is merely a semantic string. The "pattern" result kind should
help with other kinds of code templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
92eff466867fd6a82fb3e245f2091e96a3e9888e 17-Nov-2009 Douglas Gregor <dgregor@apple.com> StringRef'ify CodeCompletionString

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
3a2838d14251427089c39caec90c8abbc27f7a14 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This
eliminates the need for a factory function. Clients now just pass the object
to consume the results in directly.

- CodeCompleteConsumer is cheap to construct, so building it whenever we are
doing code completion is reasonable.

Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
ad5757f798b08f24942f093c4ac8b9fc2b527d39 12-Nov-2009 Daniel Dunbar <daniel@zuster.org> Spell empty StringRef correctly (0 is a null StringRef, which is not the same).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
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/lib/Sema/CodeCompleteConsumer.cpp
3f7c7f48654230d8e379214cfe49fcf2fde0a2c6 30-Oct-2009 Douglas Gregor <dgregor@apple.com> Include macros in code-completion results

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
f52cedee8701dca77bcbba5c705b6e388680ae56 10-Oct-2009 Douglas Gregor <dgregor@apple.com> Minor tweaks for code-completion:
- Filter out unnamed declarations
- Filter out declarations whose names are reserved for the
implementation (e.g., __bar, _Foo)
- Place OVERLOAD: or COMPLETION: at the beginning of each
code-completion result, so we can easily separate them from other
compilation results.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e2b7eea99c0e20fd4712e374c4094a957c236953 29-Sep-2009 Douglas Gregor <dgregor@apple.com> Make sure to flush raw_string_ostream, from John Thompson

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
86d802e03a267af79663990c39865c67e0645238 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Print the results of code-completion for overloading by displaying the
signature of the function with the current parameter highlighted as a
placeholder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
0594438e06f58ab3798416324780ab39ca9c8f54 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Separate the code-completion results for call completion from the
results for other, textual completion. For call completion, we now
produce enough information to show the function call argument that we
are currently on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
0563c2677cfc20c9450342ddc53aa96971671c71 23-Sep-2009 Douglas Gregor <dgregor@apple.com> Tweak the code-completion results ranking and formation, so that
members found in base classes have the same ranking as members found
in derived classes. However, we will introduce an informative note for
members found in base classes, showing (as a nested-name-specifier)
the qualification to name the base class, to make it clear which
members are from bases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
86d9a52c24d390631a888d4ff812e1b15445e0a0 21-Sep-2009 Douglas Gregor <dgregor@apple.com> Refactor and simplify the CodeCompleteConsumer, so that all of the
real work is performed within Sema. Addresses Chris's comments, but
still retains the heavyweight list-of-multimaps data structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
ff360b64a63ebaf3c42ee75b6cf1aae8972c6280 19-Sep-2009 Douglas Gregor <dgregor@apple.com> In C++ code completion, only suggest the "template" keyword after ".",
"->", or "::" if we will be looking into a dependent context. It's not
wrong to use the "template" keyword, but it's to needed, either.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
63f07c55d58951574afe9bbb9f7cb3f92eecdd9b 19-Sep-2009 Douglas Gregor <dgregor@apple.com> Make the construction of the code-completion string for a function
template smarter, by taking into account which function template
parameters are deducible from the call arguments. For example,

template<typename RandomAccessIterator>
void sort(RandomAccessIterator first, RandomAccessIterator last);

will have a code-completion string like

sort({RandomAccessIterator first}, {RandomAccessIterator last})

since the template argument for its template parameter is
deducible. On the other hand,

template<class X, class Y>
X* dyn_cast(Y *Val);

will have a code-completion string like

dyn_cast<{class X}>({Y *Val})

since the template type parameter X is not deducible from the function
call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
56ff871ae74b1edccff44efe296f3167d694ce48 19-Sep-2009 Douglas Gregor <dgregor@apple.com> Introduce code completion patterns for templates, which provide the
angle brackets < > along with placeholder template arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
e6e0361984b077d205e9a45d64257d41d2c788c8 19-Sep-2009 Douglas Gregor <dgregor@apple.com> Introduce code completion strings, which describe how to *use* the
results of code completion, e.g., by providing function call syntax
with placeholders for each of the parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
ed8d322b4086b8b1e1f78b21389cabb23457dcb3 18-Sep-2009 Douglas Gregor <dgregor@apple.com> C++ code completion after the "operator" keyword. Provide overloaded
operators, type specifiers, type names, and nested-name-specifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
49f40bd0c9c9de5e74727774fec429b47d36303a 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Introduce four new code-completion hooks for C++:

- after "using", show anything that can be a nested-name-specifier.
- after "using namespace", show any visible namespaces or namespace aliases
- after "namespace", show any namespace definitions in the current scope
- after "namespace identifier = ", show any visible namespaces or
namespace aliases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
5836b010d0a74c8b7be3f2616332cd70d3c87f83 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Don't perform name lookup into a given declaration context more than once during code completion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
75b7128e93d736331bde659b05cd176f9dd6d047 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Handle using declarations and overload sets in code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
33224e61bfca370850abae89bbd415a4dabe07fa 18-Sep-2009 Douglas Gregor <dgregor@apple.com> For code completion in C++ member access expressions and tag names,
look into the current scope for anything that could start a
nested-names-specifier. These results are ranked worse than any of the
results actually found in the lexical scope.

Perform a little more pruning of the result set, eliminating
constructors, __va_list_tag, and any duplication of declarations in
the result set. For the latter, implemented
NamespaceDecl::getCanonicalDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
b1c28a1f7ef3bd3616df6ddcdb503f4b480a8df6 18-Sep-2009 Douglas Gregor <dgregor@apple.com> When gathering results for code completion, only include hidden
results when there is some way to refer to them in the language, such
as with a qualified name in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
374929f7e88f6c7a96382b3eb4201b721c418372 18-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement code completion for tags, e.g., code completion after "enum"
will provide the names of various enumerations currently
visible. Introduced filtering of code-completion results when we build
the result set, so that we can identify just the kinds of declarations
we want.

This implementation is incomplete for C++, since we don't consider
that the token after the tag keyword could start a
nested-name-specifier.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp
81b747b7fcc91c2fba9a3183d8fac80adbfc1d3e 17-Sep-2009 Douglas Gregor <dgregor@apple.com> 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".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/CodeCompleteConsumer.cpp