| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
delimiter pairs and detect when we exceed the implementation limit for
nesting depth, from Aaron Ballman!
llvm-svn: 141782
|
| |
|
|
|
|
|
|
| |
interface/implementation
don't emit unavailable errors.
llvm-svn: 141334
|
| |
|
|
|
|
|
|
| |
objc method decls.
They are not stored in the AST yet.
llvm-svn: 140984
|
| |
|
|
|
|
|
|
| |
from the parser.
They are not kept in the AST yet.
llvm-svn: 140982
|
| |
|
|
|
|
| |
attributes on the parameter declaration.
llvm-svn: 140944
|
| |
|
|
|
|
|
| |
MatchRHSPunctuation appropriately and giving a useful source location
for the complaint about attributes being added to a category.
llvm-svn: 140404
|
| |
|
|
| |
llvm-svn: 140367
|
| |
|
|
| |
llvm-svn: 140293
|
| |
|
|
|
|
|
|
|
|
| |
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would cut off the source file buffer at the code-completion
point; this impeded code-completion inside C++ inline methods and,
recently, with buffering ObjC methods.
Have the code-completion inserted into the source buffer so that it can
be buffered along with a method body. When we actually hit the code-completion
point the cut-off lexing or parsing.
Fixes rdar://10056932&8319466
llvm-svn: 139086
|
| |
|
|
|
|
|
|
|
|
| |
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851
llvm-svn: 138913
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.
llvm-svn: 138865
|
| |
|
|
|
|
| |
No change in functionality.
llvm-svn: 138742
|
| |
|
|
|
|
|
|
|
|
| |
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.
llvm-svn: 138709
|
| |
|
|
| |
llvm-svn: 138584
|
| |
|
|
|
|
| |
as in @class foo, bar. More cleanup to follow.
llvm-svn: 138567
|
| |
|
|
| |
llvm-svn: 138276
|
| |
|
|
|
|
| |
a context switching object.
llvm-svn: 138248
|
| |
|
|
|
|
| |
failures are resolved.
llvm-svn: 138234
|
| |
|
|
| |
llvm-svn: 138049
|
| |
|
|
|
|
|
|
|
|
| |
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.
llvm-svn: 138040
|
| |
|
|
|
|
|
| |
supposed to be a full-expression; make it so. In ARC, make sure
we retain the lock for the entire protected block.
llvm-svn: 136271
|
| |
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
| |
|
|
|
|
| |
for 'auto' in obj-c catch.
llvm-svn: 134271
|
| |
|
|
| |
llvm-svn: 133346
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
| |
|
|
|
|
| |
properties.
llvm-svn: 132866
|
| |
|
|
|
|
|
| |
It is not a sanctioned keyword and is assumed as default.
// rdar://8790791
llvm-svn: 132753
|
| |
|
|
|
|
|
|
|
|
|
| |
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317
llvm-svn: 130019
|
| |
|
|
|
|
| |
with '::', when :: isn't the first part of the selector.
llvm-svn: 128344
|
| |
|
|
|
|
|
|
| |
the following '@'. Conceivably, we could skip tokens until something that
can validly start an @interface declaration here, but it's not clear that
it matters.
llvm-svn: 128325
|
| |
|
|
|
|
|
|
|
| |
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.
llvm-svn: 128209
|
| |
|
|
|
|
| |
from a normal type-spec, just for completeness.
llvm-svn: 128185
|
| |
|
|
|
|
|
|
|
|
|
| |
ActOnFinishFunctionBody/ActOnBlockStmtExpr. This way, we ensure that
we diagnose undefined labels before the jump-scope checker gets run,
since the jump-scope checker requires (as its invariant) that all of
the GotoStmts be wired up correctly.
Fixes PR9495.
llvm-svn: 127738
|
| |
|
|
|
|
|
| |
method prototypes under the -Wduplicate-method-arg and
turn it off by default.
llvm-svn: 127552
|
| |
|
|
|
|
|
| |
by using an enumeration rather than a boolean value. No functionality
change.
llvm-svn: 127259
|
| |
|
|
|
|
| |
<rdar://problem/8767704>.
llvm-svn: 125604
|
| |
|
|
|
|
|
| |
warning when same parameter name used multiple times.
// rdar://8877730
llvm-svn: 125229
|
| |
|
|
|
|
| |
-Wint-to-pointer-cast.
llvm-svn: 123719
|
| |
|
|
|
|
|
|
|
| |
Objective-C declarations and statements. Fixes
<rdar://problem/8814576> (wrong source line for diagnostics about
missing ';'), and now we actually consume the ';' at the end of a
@compatibility_alias directive!
llvm-svn: 122855
|
| |
|
|
|
|
|
|
| |
trySkippingFunctionBodyForCodeCompletion and check isCodeCompletionEnabled() before doing the call.
Suggestions by Chris.
llvm-svn: 122792
|
| |
|
|
| |
llvm-svn: 122781
|
| |
|
|
|
|
|
| |
on array and function declarators. This is pretty far from complete, and I'll
revisit it later if someone doesn't beat me to it.
llvm-svn: 122535
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
implicitly atomic under -Wimplicit-atomic-properties
flag. // rdar://8774580
llvm-svn: 122095
|
| |
|
|
| |
llvm-svn: 122041
|
| |
|
|
|
|
|
|
| |
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.
llvm-svn: 119805
|
| |
|
|
|
|
|
|
|
| |
@synthesize foo = _foo;
keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.
llvm-svn: 119447
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
manually managing them
using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these
objects; digging deeper into the code, it was clear that our management of these objects was a mess. The ownership rules were murky at best, and not always followed. Worse, there are plenty of error paths where we could screw up.
This patch introduces AttributeList::Factory, which is a factory class that creates AttributeList
objects and then blows them away all at once. While conceptually simple, most of the changes in
this patch just have to do with migrating over to the new interface. Most of the changes have resulted in some nice simplifications.
This new strategy currently holds on to all AttributeList objects during the lifetime of the Parser
object. This is easily tunable. If we desire to have more bound the lifetime of AttributeList
objects more precisely, we can have the AttributeList::Factory object (in Parser) push/pop its
underlying allocator as we enter/leave key methods in the Parser. This means that we get
simple memory management while still having the ability to finely control memory use if necessary.
Note that because AttributeList objects are now BumpPtrAllocated, we may reduce malloc() traffic
in many large files with attributes.
This fixes the leak reported in: <rdar://problem/8650003>
llvm-svn: 118675
|