#
4da4e257 |
| 17-Dec-2010 |
Chris Lattner <sabre@nondot.org> |
fix typo
llvm-svn: 122041
|
#
3a001f48 |
| 19-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
When parsing something that looks like an ill-formed protocol-qualifier list without a leading type (e.g., <#blah#>), don't complain about it being an archaic protocol-qualifier list unless it actual
When parsing something that looks like an ill-formed 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
show more ...
|
#
b1b71e50 |
| 17-Nov-2010 |
Douglas Gregor <dgregor@apple.com> |
For an Objective-C @synthesize statement, e.g.,
@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
|
#
5eec2b0b |
| 10-Nov-2010 |
Ted Kremenek <kremenek@apple.com> |
Region-allocate all AttributeList objects from a factory object instead of manually managing them using new/delete and OwningPtrs. After memory profiling Clang, I witnessed periodic leaks of these o
Region-allocate all AttributeList objects from a factory object instead of 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
show more ...
|
#
dbee9862 |
| 09-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Issues good diagnostic when @end is missing. // rdar://8283484
llvm-svn: 118629
|
#
d4c5348a |
| 02-Nov-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Diagnose a coherant message when @interface does not terminate with @end. // rdar: //7824372
llvm-svn: 117991
|
#
06e41ae5 |
| 21-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach the C++ simple-type-specifier parser and tentative parses about protocol-qualified types such as id<Protocol>.
llvm-svn: 117081
|
#
f6c73c46 |
| 12-Oct-2010 |
Cameron Esfahani <dirty@apple.com> |
Fix spelling error.
llvm-svn: 116283
|
Revision tags: llvmorg-2.8.0 |
|
#
fe15a78f |
| 02-Oct-2010 |
Anders Carlsson <andersca@mac.com> |
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.
llvm-svn: 115411
|
Revision tags: llvmorg-2.8.0-rc3 |
|
#
f86e4da7 |
| 20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Refactor code completion for expressions that occur as arguments in Objective-C message sends. There is no functionality change here; this is prep work for using the parameter types to help guide the
Refactor code completion for expressions that occur as arguments in 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
show more ...
|
Revision tags: llvmorg-2.8.0-rc2 |
|
#
abf4a3e4 |
| 16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement automatic bracket insertion for Objective-C class message sends. These are far trickier than instance messages, because we typically have something like
NSArray alloc]
where it appears
Implement automatic bracket insertion for Objective-C class message 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
show more ...
|
#
970aed92 |
| 15-Sep-2010 |
Nick Lewycky <nicholas@mxc.ca> |
Initialize TypeOrExpr to NULL to silence a false-positive uninitialized warning from certain GCC's. Patch by Neil Vachharajani!
llvm-svn: 113995
|
#
e9bba4f1 |
| 15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement bracket insertion for Objective-C instance message sends as part of parser recovery. For example, given:
a method1:arg];
we detect after parsing the expression "a" that we have the star
Implement bracket insertion for Objective-C instance message sends as 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
show more ...
|
#
45d6bdfa |
| 07-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve recovery when there is a stray ']' or ')' before the ';' at the end of a statement. Fixes <rdar://problem/6896493>.
llvm-svn: 113202
|
Revision tags: llvmorg-2.8.0-rc1, llvmorg-2.8.0-rc0 |
|
#
dadfc1c1 |
| 03-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use std::string instead of llvm::StringRef to avoid dangling ref. Per Chris's comment.
llvm-svn: 112979
|
#
9e42a952 |
| 03-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Use getSpelling to get original text of the c++ operator token. (radar 8328250).
llvm-svn: 112977
|
#
0389df4a |
| 03-Sep-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Patch to allow alternative representation of c++ operators (and, or, etc.) to be used as selectors to match g++'s behavior.
llvm-svn: 112935
|
#
1ba64457 |
| 27-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
handle :: in selectors in objc++ mode, rdar://8366474
llvm-svn: 112307
|
#
faf5fb4b |
| 26-Aug-2010 |
John McCall <rjmccall@apple.com> |
One who seeks knowledge learns something new every day. One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, no
One who seeks knowledge learns something new every day. One who seeks the Tao unlearns something new every day. Less and less remains until you arrive at non-action. When you arrive at non-action, nothing will be left undone.
llvm-svn: 112244
show more ...
|
#
67c692cc |
| 26-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement code completion for @selector expressions
llvm-svn: 112186
|
#
dadc575b |
| 24-Aug-2010 |
John McCall <rjmccall@apple.com> |
OwningExprResult -> ExprResult. This patch brought to you by M-x query-replace-regexp \(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result
llvm-svn: 111903
|
#
ba7bf595 |
| 24-Aug-2010 |
John McCall <rjmccall@apple.com> |
Abstract out passing around types and kill off ActionBase.
llvm-svn: 111901
|
#
99fa264a |
| 24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Provide code completion results for the context-sensitive Objective-C keywords "in", "out", "inout", "byref", "bycopy", and "oneway".
llvm-svn: 111884
|
#
b268a282 |
| 23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).
llvm-svn: 111863
|
#
616d3e71 |
| 23-Aug-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Handling remaining rule for synthesize bitfields in class extensions (nonfragile-abi2).For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add
Handling remaining rule for synthesize bitfields in class extensions (nonfragile-abi2).For every class @interface and class extension @interface, if the last ivar is a bitfield of any type, then add an implicit `char :0` ivar to the end of that interface.
llvm-svn: 111857
show more ...
|