| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Some targets such as Python 2.7.16 still use VERSION in
their builds. Without VERSION defined, the source code
has syntax errors.
Reverting as it will probably break many other things.
Noticed by Sterling Augustine
llvm-svn: 365992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It has been introduced in 2011 for gcc compat:
https://github.com/llvm-mirror/clang/commit/ad1a4c6e89594e704775ddb6b036ac982fd68cad
it is probably time to remove it
Reviewers: rnk, dexonsmith
Reviewed By: rnk
Subscribers: dschuff, aheejin, fedor.sergeev, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64062
llvm-svn: 365962
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: kadircet
Reviewed By: kadircet
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D55648
llvm-svn: 349053
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Make completion behave consistently no matter if it is run at the
start, in the middle or at the end of an identifier that happens to
be a keyword or a macro name. Since completion is often ran on
incomplete identifiers, they may turn into keywords by accident.
For example, we should produce same results for all of these
completion points:
// ^ is completion point.
^class
cla^ss
class^
Previously clang produced different results for the last case (as if
the completion point was after a space: `class ^`).
This change also updates some offsets in tests that (unintentionally?)
relied on the old behavior.
Reviewers: sammccall, bkramer, arphaman, aaron.ballman
Reviewed By: sammccall
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D45887
llvm-svn: 330717
|
|
|
|
|
|
|
|
| |
Objective-C message receiver, the user is as likely to want to write a
type name as any other declaration, so give types the same priority as
other declarations. Fixes <rdar://problem/12480600>.
llvm-svn: 174038
|
|
|
|
|
|
| |
expressions (this, sizeof, etc.).
llvm-svn: 142424
|
|
|
|
|
|
|
|
|
| |
type matches have a bigger impact. The impetus for this change was
that, when initializing an enumeration value, we want enumerators of
that enumeration type to have a higher priority than, e.g., unrelated
local variables.
llvm-svn: 116774
|
|
|
|
|
|
| |
class template) and are in a context where we can have a value.
llvm-svn: 114441
|
|
|
|
|
|
|
|
| |
at the statement level or in Objective-C message receivers. Therefore,
just give types and declarations the same basic priority, and adjust
from there.
llvm-svn: 114374
|
|
|
|
|
|
|
| |
statement context; it really isn't helpful in practice (remember
printf!) and we'll be doing other adjustments for statements very soon.
llvm-svn: 114358
|
|
|
|
| |
llvm-svn: 114086
|
|
|
|
|
|
|
|
| |
expression, e.g., after the '(' that could also be a type cast. Here,
we provide types as code-completion results in C/Objective-C (C++
already had them), although we wouldn't in a normal expression context.
llvm-svn: 113904
|
|
|
|
|
|
|
| |
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.
llvm-svn: 113090
|
|
|
|
|
|
|
|
| |
declaration send or a variadic function call, collapse the ", ..."
into the parameter before it, so that we don't get a second
placeholder.
llvm-svn: 112579
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
expect "natural" language and should not provide any completions,
e.g., comments, string literals, #error.
llvm-svn: 112054
|
|
|
|
|
|
|
| |
performing code completion at the statement level (rather than in an
arbitrary expression).
llvm-svn: 112001
|
|
|
|
|
|
|
|
|
| |
present, prefer values to types, since it's more common to compute
with values than it is to declare new entities or perform type
casts. So, tweak the ranking of types vs. other declarations and
constants accordingly.
llvm-svn: 111998
|
|
|
|
|
|
|
| |
the ", nil", ", NULL", or ", (void*)0" to the end of the code
completion, since it always has to be there anyway.
llvm-svn: 111867
|
|
|
|
|
|
|
| |
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.
llvm-svn: 111858
|
|
|
|
|
|
| |
results for expression contexts within a function.
llvm-svn: 111851
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the usage type of each declaration result, then compare those types to
the preferred type of the completion. This provides parity in the
priority calculation between the code-completion results produced
directly from Sema and those cached by ASTUnit.
For the standard Cocoa.h (+ others) example, there's a penalty of 3-4
hundredeths of a second when caching the global results (for ~31,000
results), because we need an ASTContext-agnostic representation of
types for the comparison, and therefore we use... strings. Eventually,
we'd like to implement a more efficient ASTContext-agnostic encoding
of types.
llvm-svn: 111165
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
literal. Fixes <rdar://problem/8044135>.
llvm-svn: 105181
|
|
|
|
|
|
|
| |
called function itself is invalid (e.g., because of a semantic error
referring to that declaration). Fixes <rdar://problem/8044142>.
llvm-svn: 105175
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
expression context in C/Objective-C, or when we're in an
@interface/@implementation/@protocol in Objective-C(++).
llvm-svn: 104908
|
|
|
|
| |
llvm-svn: 104751
|
|
|
|
|
|
| |
statements }) in the code-completion results if explicitly requested.
llvm-svn: 104637
|
|
e.g., the right-hand side of binary expressions.
llvm-svn: 100526
|