| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
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!
llvm-svn: 134615
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
| |
keyword in objc property decl.
llvm-svn: 132877
|
|
|
|
|
|
| |
libclang. Fixes <rdar://problem/9537904>.
llvm-svn: 132603
|
|
|
|
|
|
|
|
| |
+keyPathsForValuesAffecting<Key> completion was mislabeled as an
instance method, and +automaticallyNotifiesObserversOf<Key> was
missing entirely. Fixes <rdar://problem/9516762>.
llvm-svn: 132452
|
|
|
|
|
|
|
| |
also include methods with zero-argument selectors. Implements
<rdar://problem/9048332>.
llvm-svn: 130922
|
|
|
|
|
|
|
| |
that we've previously seen, both in declared methods and from previous
KVC completions, to eliminate duplicates. Fixes <rdar://problem/9162207>.
llvm-svn: 130890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementation such as
@synthesize Prop1 =
Give priority to ivars whose type matches or closely matches the
property type (as we do for several other kinds of
results). Additionally, if there is an ivar with the same name as the
property, or differs only due to a _ prefix or suffix, give that ivar
a priority bump. Finally, verify that this search is properly
returning ivars within class extensions and implementations
(<rdar://problem/8488854>).
llvm-svn: 129699
|
|
|
|
|
|
|
|
|
|
|
| |
implementation
@synthesize <property> =
also produce a completion for a to-be-synthesized ivar named
_<property>.
llvm-svn: 129697
|
|
|
|
| |
llvm-svn: 129567
|
|
|
|
|
|
|
| |
completion, look through block pointer and function pointer types to the
result type of the block/function. Fixes <rdar://problem/9282583>.
llvm-svn: 129535
|
|
|
|
|
|
|
|
| |
RTTI is disabled. Similarly, don't suggest throw or try as code
completion results when C++ exceptions are disabled. Fixes
<rdar://problem/9193560>.
llvm-svn: 129346
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch authored by Eric Niebler.
Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.
This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)
llvm-svn: 129143
|
|
|
|
| |
llvm-svn: 128339
|
|
|
|
|
|
| |
This fixes PR 8738, 9060 and 9132.
llvm-svn: 126069
|
|
|
|
|
|
|
| |
enumeration type, prioritize the enumeration constants and don't
provide completions for any other expressions. Fixes <rdar://problem/7283668>.
llvm-svn: 125991
|
|
|
|
|
|
|
|
|
|
|
|
| |
that was ignored in a few places (most notably, code
completion). Introduce Selector::getNameForSlot() for the common case
where we only care about the name. Audit all uses of
getIdentifierInfoForSlot(), switching many over to getNameForSlot(),
fixing a few crashers.
Fixed <rdar://problem/8939352>, a code-completion crasher.
llvm-svn: 125977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
I will not hold on to temporary StringRefs.
llvm-svn: 125718
|
|
|
|
|
|
| |
(KVC) and Key-Value Observing (KVO) protocols.
llvm-svn: 125696
|
|
|
|
|
|
|
| |
Objective-C, also look in the categories and class extensions of our
superclasses. Fixes <rdar://problem/8853540>.
llvm-svn: 125628
|
|
|
|
|
|
|
| |
prototype, e.g., ^() rather than ^(void). Fixes
<rdar://problem/8875712>.
llvm-svn: 125608
|
|
|
|
|
|
| |
<rdar://problem/8767704>.
llvm-svn: 125604
|
|
|
|
|
|
|
|
| |
separately handle the case of a local declaration-specifier list,
including all types in the set of options. Fixes
<rdar://problem/8790735> and <rdar://problem/8662831>.
llvm-svn: 125594
|
|
|
|
|
|
|
| |
the string copying goes through a single place that can have
associated state.
llvm-svn: 124698
|
|
|
|
|
|
| |
eliminating the need to copy those strings.
llvm-svn: 124683
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
llvm-svn: 124673
|
|
|
|
|
|
|
| |
more accurate, and makes it make sense for it to hold a delegating constructor
call.
llvm-svn: 123084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.
With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.
Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.
llvm-svn: 122347
|
|
|
|
| |
llvm-svn: 121795
|
|
|
|
| |
llvm-svn: 121488
|
|
|
|
| |
llvm-svn: 121424
|
|
|
|
|
|
|
|
|
|
| |
global code completions are disabled (e.g., because they are
cached). Also, make sure that forward-declared protocols are visited
when we look for all visible names within a declaration context.
Previously, we would end up with duplicate completions for protocols.
llvm-svn: 121416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used in a constructor initializer list:
struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};
clang will now deal with au_i1 explicitly as an IndirectFieldDecl.
llvm-svn: 120900
|
|
|
|
|
|
|
| |
Objective-C message sends, which have only whitespace in their
TypedText chunk. Such results have no purpose.
llvm-svn: 119569
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That bug concerned the well-formedness of code such as (&ovl)(a, b,
c). GCC rejects the code, while EDG accepts it. On further study of the
standard, I see no support for EDG's position: in particular, C++
[over.over] does not list this as a context where we can take the
address of an overloaded function, C++ [over.call.func] does not
reference the address-of operator at any point, and C++ [expr.call]
claims that the function argument in a call is either a function
lvalue or a pointer-to-function; (&ovl) is neither.
llvm-svn: 118620
|
|
|
|
|
|
| |
with, e.g., (&f)(a, b, c). Fixes PR8013.
llvm-svn: 118508
|
|
|
|
|
|
|
| |
definitions in its results. The original declarations will be visible
wherever they are declared.
llvm-svn: 118484
|
|
|
|
|
|
|
|
| |
and we statically can compute a bound on the actual type (e.g.,
because it's a send to the the magic "class" instance method), code
complete as if we were performing a class message send to that class.
llvm-svn: 118443
|
|
|
|
|
|
| |
can be used to automatically synthesize an ivar.
llvm-svn: 118052
|
|
|
|
|
|
|
|
| |
C++/C99/Objective-C, so that we properly include types. This fix
affects global caching of code-completion results; without caching,
the behavior was already correct.
llvm-svn: 116757
|
|
|
|
|
|
|
|
|
| |
declaring methods and when sending messages to them, by bringing all
of the selector into TypedCheck chunks in the completion result. This
way, we can improve the sorting of these results to account for the
full selector name rather than just the first chunk.
llvm-svn: 116746
|
|
|
|
|
|
|
| |
(after - or +), always traverse superclasses and all categories. The
programmer may want to complete a method from *anywhere*.
llvm-svn: 116723
|
|
|
|
| |
llvm-svn: 116436
|
|
|
|
|
|
|
|
|
|
| |
clang_codeCompleteAt(). This uncovered a few issues with the latter:
- ASTUnit wasn't saving/restoring diagnostic state appropriately between
reparses and code completions.
- "Overload" completions weren't being passed through to the client
llvm-svn: 116241
|
|
|
|
|
|
| |
rather than a space.
llvm-svn: 116097
|
|
|
|
|
|
|
|
| |
function/method argument, include the parameter name and always
include parentheses (even for zero-parameter blocks). Otherwise, the
block literal placeholder '^' can look very weird.
llvm-svn: 115444
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>.
llvm-svn: 114704
|
|
|
|
|
|
| |
class template) and are in a context where we can have a value.
llvm-svn: 114441
|
|
|
|
|
|
|
|
|
|
|
|
| |
message send, e.g.,
[[NSString alloc] initWithCString:<CC>
look up all of the possible methods and determine the preferred type
for the argument expression based on the type of the corresponding
parameter.
llvm-svn: 114379
|
|
|
|
|
|
|
|
| |
Objective-C message sends. There is no functionality change here; this
is prep work for using the parameter types to help guide the
expression results when code-completing the argument.
llvm-svn: 114375
|