| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 117416
|
|
|
|
| |
llvm-svn: 117400
|
|
|
|
| |
llvm-svn: 117390
|
|
|
|
| |
llvm-svn: 117381
|
|
|
|
| |
llvm-svn: 117373
|
|
|
|
|
|
|
|
| |
typo. This can happen with context-sensitive keywords like "super",
when typo correction didn't know that "super" wasn't permitted in this
context.
llvm-svn: 117372
|
|
|
|
|
|
| |
a crash dialog on my system.
llvm-svn: 117181
|
|
|
|
|
|
|
| |
kinds of lookup into Objective-C classes were tangled together, a
situation that was compounded by automatically synthesized ivars.
llvm-svn: 116907
|
|
|
|
| |
llvm-svn: 116904
|
|
|
|
| |
llvm-svn: 116898
|
|
|
|
|
|
| |
which seems to be working properly.
llvm-svn: 116894
|
|
|
|
|
|
| |
one I'm building with
llvm-svn: 116642
|
|
|
|
|
|
|
|
|
| |
we did was an acceptable lookup. If it is, then we can re-use that
lookup result. If it isn't, we have to perform the lookup again. This
is almost surely the cause behind the mysterious typo.m failures on
some builders; we were getting the wrong lookup results returned.
llvm-svn: 116586
|
|
|
|
| |
llvm-svn: 116577
|
|
|
|
| |
llvm-svn: 116576
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a typo:
t.c:1:7: error: invalid '==' at end of declaration; did you mean '='?
int x == 0;
^~
=
Implements rdar://8488464.
llvm-svn: 116035
|
|
|
|
|
|
|
|
|
|
|
| |
for member functions. + Fixit.
Example:
class A {
void A::foo(); //warning: extra qualification on member 'foo'
};
llvm-svn: 115347
|
|
|
|
| |
llvm-svn: 114234
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of a binary expression, continue on and parse the right-hand side of
the binary expression anyway, but don't call the semantic actions to
type-check. Previously, we would see the error and then, effectively,
skip tokens until the end of the statement.
The result should be more useful recovery, both in the normal case
(we'll actually see errors beyond the first one in a statement), but
it also helps code completion do a much better job, because we do
"real" code completion on the right-hand side of an invalid binary
expression rather than completing with the recovery completion. For
example, given
x = p->y
if there is no variable named "x", we can still complete after the p->
as a member expression. Along the recovery path, we would have
completed after the "->" as if we were in an expression context, which
is mostly useless.
llvm-svn: 114225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sends. These are far trickier than instance messages, because we
typically have something like
NSArray alloc]
where it appears to be a declaration of a variable named "alloc" up
until we see the ']' (or a ':'), and at that point we can't backtrace.
So, we use a combination of syntactic and semantic disambiguation to
treat this as a message send only when the type is an Objective-C type
and it has the syntax of a class message send (which would otherwise
be ill-formed).
llvm-svn: 114057
|
|
|
|
|
|
|
|
|
|
|
| |
narrow, almost useless case where we're inside a parenthesized
expression, e.g.,
(NSArray alloc])
The solution to the general case still eludes me.
llvm-svn: 114039
|
|
|
|
|
|
|
|
| |
super method:arg]
will now recover nicely and insert the '[' before 'super'.
llvm-svn: 113971
|
|
|
|
|
|
| |
a getFoo]
llvm-svn: 113969
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
part of parser recovery. For example, given:
a method1:arg];
we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:
fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[
The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.
llvm-svn: 113968
|
|
|
|
| |
llvm-svn: 113324
|
|
|
|
|
|
| |
the end of a statement. Fixes <rdar://problem/6896493>.
llvm-svn: 113202
|
|
|
|
|
|
| |
enumeration definition. Fixes <rdar://problem/7159693>.
llvm-svn: 113201
|
|
|
|
|
|
| |
member initializers in a C++ constructor. Fixes <rdar://problem/7796492>.
llvm-svn: 113199
|
|
|
|
|
|
|
| |
removes the copy. Patch from Eelis van der Weegen, tweaked/updated by
me.
llvm-svn: 111807
|
|
|
|
|
|
|
| |
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.
llvm-svn: 107992
|
|
|
|
| |
llvm-svn: 107194
|
|
|
|
| |
llvm-svn: 107191
|
|
|
|
|
|
|
|
| |
"std", with a warning, to improve GCC compatibility. Fixes PR7517.
As a drive-by, add typo correction for using directives.
llvm-svn: 107172
|
|
|
|
| |
llvm-svn: 105222
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a simple, quick check to determine whether the expression starting
with '[' can only be an Objective-C message send. If so, don't parse
it as an array subscript expression. This improves recovery for, e.g.,
[a method1]
[a method2]
so that we now produce
t.m:10:13: error: expected ';' after expression
[a method]
^
instead of some mess about expecting ']'.
llvm-svn: 105221
|
|
|
|
| |
llvm-svn: 104027
|
|
|
|
|
|
|
|
|
| |
non-function-local declarations with names similar to what the user
typed. For example, this allows us to correct 'supper' to 'super' in
an Objective-C message send, even though the C function 'isupper' has
the same edit distance.
llvm-svn: 104023
|
|
|
|
|
|
|
|
|
| |
consider "super" as a candidate whenever we're parsing an expression
within an Objective-C method in an interface that has a superclass. At
some point, we'd like to give "super" a little edge over non-local
names; that will come later.
llvm-svn: 104022
|
|
|
|
|
|
|
| |
cases where Clang can suggest and fix and suggest and not auto-fix (because of
current limitations).
llvm-svn: 103987
|
|
|
|
|
|
| |
files with the additional suffix in the middle.
llvm-svn: 102230
|
|
|
|
| |
llvm-svn: 101943
|
|
|
|
|
|
|
|
| |
look from an Objective-C class or category to its implementation, to
pick up synthesized ivars. Fixes a problem reported by David
Chisnall.
llvm-svn: 101792
|
|
|
|
|
|
| |
-fixit-at specified a particular fixit to fix, or the -o flag was used.
llvm-svn: 101359
|
|
|
|
|
|
|
| |
correction find names when a call failed. Fixes
<rdar://problem/7853795>.
llvm-svn: 101278
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generally recover from typos in keywords (since we would effectively
have to mangle the token stream). However, there are still benefits to
typo-correcting with keywords:
- We don't make stupid suggestions when the user typed something
that is similar to a keyword.
- We can suggest the keyword in a diagnostic (did you mean
"static_cast"?), even if we can't recover and therefore don't have
a fix-it.
llvm-svn: 101274
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
receiver is a mis-typed class name. Previously, we would give a non-specific
typo-correction diagnostic from the expression-parsing code, but there
was no fix-it because it was too late to recover. Now, we give a nice
diagnostic
honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'?
[Hnk method];
^~~
Honk
honk.m:1:1: note: 'Honk' declared here
@interface Honk
^
which includes a fix-it.
We still need to recover better from mis-typing "super".
llvm-svn: 101211
|
|
|
|
| |
llvm-svn: 101073
|
|
|
|
|
|
|
|
|
| |
'strcmp' is bad, and
we don't have enough information to tell them how to use 'strncmp'. Instead, change the
diagnostic to indicate they should use 'strncmp'.
llvm-svn: 100890
|
|
|
|
|
|
|
|
| |
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.
llvm-svn: 100880
|
|
|
|
|
|
|
| |
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.
llvm-svn: 100873
|