| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 112186
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
path and ...", it is failing tests.
llvm-svn: 112161
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
into the clients", because the C standard library sucks. Where's my
stable sort, huh?
llvm-svn: 112121
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Clients of Sema don't need to know (for example) the list of diagnostics we
support.
llvm-svn: 112093
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 112070
|
|
|
|
|
|
| |
that ASTUnit knows not to try to provide completions there.
llvm-svn: 112057
|
|
|
|
|
|
|
| |
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.
llvm-svn: 112054
|
|
|
|
| |
llvm-svn: 112038
|
|
|
|
| |
llvm-svn: 112028
|
|
|
|
|
|
|
| |
(e.g., for message sends or method declaration/definition
completions), adjust methods that come from a base class.
llvm-svn: 112013
|
|
|
|
|
|
|
| |
performing code completion at the statement level (rather than in an
arbitrary expression).
llvm-svn: 112001
|
|
|
|
|
|
| |
arguments.
llvm-svn: 111976
|
|
|
|
|
|
| |
some of it off completely.
llvm-svn: 111957
|
|
|
|
|
|
|
| |
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.
llvm-svn: 111954
|
|
|
|
|
|
| |
e.g., after a "#" we'll suggest #if, #ifdef, etc.
llvm-svn: 111943
|
|
|
|
|
|
|
| |
corresponds to a block pointer, provide the skeleton of a block
literal.
llvm-svn: 111918
|
|
|
|
|
|
|
| |
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.
llvm-svn: 111907
|
|
|
|
| |
llvm-svn: 111904
|
|
|
|
|
|
|
| |
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result
llvm-svn: 111903
|
|
|
|
| |
llvm-svn: 111901
|
|
|
|
|
|
| |
for declarator name completions
llvm-svn: 111898
|
|
|
|
| |
llvm-svn: 111888
|
|
|
|
|
|
| |
keywords "in", "out", "inout", "byref", "bycopy", and "oneway".
llvm-svn: 111884
|
|
|
|
|
|
|
| |
the ", nil", ", NULL", or ", (void*)0" to the end of the code
completion, since it always has to be there anyway.
llvm-svn: 111867
|
|
|
|
|
|
| |
results for expression contexts within a function.
llvm-svn: 111851
|
|
|
|
|
|
|
|
| |
argument in a for-each statement (e.g., "for (id x in <blah>)"), which
restricts the expression completions provided to Objective-C types (or
class types in C++).
llvm-svn: 111843
|
|
|
|
| |
llvm-svn: 111830
|
|
|
|
|
|
|
|
|
| |
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.
llvm-svn: 111818
|
|
|
|
| |
llvm-svn: 111733
|
|
|
|
| |
llvm-svn: 111472
|
|
|
|
| |
llvm-svn: 111346
|
|
|
|
|
|
|
| |
the resulting pattern the appropriate cursor kind of an instance or
class method declaration.
llvm-svn: 111237
|
|
|
|
|
|
| |
Objective-C method declarations with > 2 parameters.
llvm-svn: 111233
|
|
|
|
|
|
|
|
|
|
| |
nested-name-specifiers. Also includes fixes to the generation of
nested-name-specifier result in the non-cached case; we were producing
lame results for namespaces and namespace aliases, which (1) didn't
always have nested-name-specifiers when we want them, and (2) did not
have the necessary "::" as part of the completion.
llvm-svn: 111203
|
|
|
|
|
|
|
|
|
|
|
| |
type class, so that we can adjust priorities appropriately when the
preferred type for the context and the actual type of the completion
are similar.
This gets us one step closer to parity of the cached completion
results with the non-cached completion results.
llvm-svn: 111139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 110945
|
|
|
|
|
|
|
| |
the code-completion consumer. The consumer can use this information to
augument, filter, or display the code-completion results.
llvm-svn: 110858
|
|
|
|
|
|
|
|
| |
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.
llvm-svn: 110803
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 110078
|
|
|
|
|
|
|
| |
condition is not of enumeration type, provide code-completion results
containing all values of integral or enumeral type.
llvm-svn: 109677
|
|
|
|
|
|
|
| |
_Foo) from code-completion results when they come from a system
header.
llvm-svn: 108338
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
declarations.
llvm-svn: 107933
|