History log of /llvm-project/clang/lib/Sema/SemaCodeComplete.cpp (Results 601 – 625 of 748)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b14904c4 13-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-comp

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

show more ...


# c3a6ade0 12-Aug-2010 Douglas Gregor <dgregor@apple.com>

Move Sema's headers into include/clang/Sema, renaming a few along the way.

llvm-svn: 110945


# 00c37ef0 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.

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

show more ...


# 1c28331b 11-Aug-2010 Douglas Gregor <dgregor@apple.com>

Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
br

Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.

llvm-svn: 110803

show more ...


# ab6a0883 09-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at>

- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead t

- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.

llvm-svn: 110610

show more ...


# 8e984da8 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 r

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

show more ...


# 75d8a328 02-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at>

Simplify global method pool implementation in Sema. No functionality change.

llvm-svn: 110078


# 85b5063f 28-Jul-2010 Douglas Gregor <dgregor@apple.com>

When performing code completion for a case statement in a switch whose
condition is not of enumeration type, provide code-completion results
containing all values of integral or enumeral type.

llvm-

When performing code completion for a case statement in a switch whose
condition is not of enumeration type, provide code-completion results
containing all values of integral or enumeral type.

llvm-svn: 109677

show more ...


# 9f1570d9 14-Jul-2010 Douglas Gregor <dgregor@apple.com>

Only filter out names reserved for the implementation (e.g., __blah or
_Foo) from code-completion results when they come from a system
header.

llvm-svn: 108338


# 603d81bf 13-Jul-2010 Douglas Gregor <dgregor@apple.com>

When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it fo

When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).

llvm-svn: 108234

show more ...


# 45879695 08-Jul-2010 Douglas Gregor <dgregor@apple.com>

Support code completion for parameter names in Objective-C method
declarations.

llvm-svn: 107933


# 95887f9c 08-Jul-2010 Douglas Gregor <dgregor@apple.com>

Introduce a new code-completion point prior to an identifier in the
selector of an Objective-C method declaration, e.g., given

- (int)first:(int)x second:(int)y;

this code completion point trigge

Introduce a new code-completion point prior to an identifier in the
selector of an Objective-C method declaration, e.g., given

- (int)first:(int)x second:(int)y;

this code completion point triggers at the location of "second". It
will provide completions that fill out the method declaration for any
known method, anywhere in the translation unit.

llvm-svn: 107929

show more ...


# 55b037b9 08-Jul-2010 Douglas Gregor <dgregor@apple.com>

During code completion, give the "nil" and "NULL" macros the same
priority as other constants. And, if we're in a place where we prefer
a pointer type, consider "nil" and "NULL" to be close matches.

During code completion, give the "nil" and "NULL" macros the same
priority as other constants. And, if we're in a place where we prefer
a pointer type, consider "nil" and "NULL" to be close matches.

llvm-svn: 107910

show more ...


# 3bf0ded3 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com>

Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731).

llvm-svn: 106597


# c4827d31 15-Jun-2010 Douglas Gregor <dgregor@apple.com>

Remove a completely useless and utterly incorrect assertion.

llvm-svn: 106040


# 9858ed5b 15-Jun-2010 Douglas Gregor <dgregor@apple.com>

Teach code completion not to ignore data members when performing code
completion for expressions.

llvm-svn: 106037


# 75b960e5 01-Jun-2010 John McCall <rjmccall@apple.com>

Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home. This is important because

Alter the ExternalASTSource interface to permit by-name lookups. PCH continues to
bring in the entire lookup table at once.

Also, give ExternalSemaSource's vtable a home. This is important because otherwise
any reference to it will cause RTTI to be emitted, and since clang is compiled
with -fno-rtti, that RTTI will contain unresolved references (to ExternalASTSource's
RTTI). So this change makes it possible to subclass ExternalSemaSource from projects
compiled with RTTI, as long as the subclass's home is compiled with -fno-rtti.

llvm-svn: 105268

show more ...


# 305a0a74 31-May-2010 Ted Kremenek <kremenek@apple.com>

Fix crash in code completion when an ObjCMethodDecl doesn't have an associated @interface.
Fixes <rdar://problem/8026215>.

llvm-svn: 105256


# 6ed3eb8a 30-May-2010 Douglas Gregor <dgregor@apple.com>

Teach code-completion for calls to be more careful with a
potentially-NULL "function" argument.

llvm-svn: 105152


# 7aa6b229 30-May-2010 Douglas Gregor <dgregor@apple.com>

Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a

Teach code completion to adjust its completion priorities based on the
type that we expect to see at a given point in the grammar, e.g., when
initializing a variable, returning a result, or calling a function. We
don't prune the candidate set at all, just adjust priorities to favor
things that should type-check, using an ultra-simplified type system.

llvm-svn: 105128

show more ...


# d37c59da 28-May-2010 Douglas Gregor <dgregor@apple.com>

Don't put method bodies into code completions unless code patterns are
turned on.

llvm-svn: 104909


# 70febae7 28-May-2010 Douglas Gregor <dgregor@apple.com>

Do not produce types as valid code completions when we're in an
expression context in C/Objective-C, or when we're in an
@interface/@implementation/@protocol in Objective-C(++).

llvm-svn: 104908


# f4c33349 28-May-2010 Douglas Gregor <dgregor@apple.com>

Make -code-completion-patterns only cover multi-line code
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.

llvm-svn: 104905


# a817a19b 27-May-2010 Douglas Gregor <dgregor@apple.com>

Implement a code-completion hook for the receiver of an Objective-C
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened befor

Implement a code-completion hook for the receiver of an Objective-C
message. This completion gives better results than just using the
"expression" completion, which is effectively what happened before.

llvm-svn: 104895

show more ...


# a2db793f 26-May-2010 Douglas Gregor <dgregor@apple.com>

Introduce priorities into the code-completion results.

llvm-svn: 104751


1...<<21222324252627282930