#
c49f5b2f |
| 23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion point when we're parsing a declarator. Here, we can only see a few things (e.g., cvr-qualifiers, nested name specifiers) and we do not want to provide other non-macro
Introduce a new code-completion point when we're parsing a declarator. Here, we can only see a few things (e.g., cvr-qualifiers, nested name specifiers) and we do not want to provide other non-macro completions. Previously, we would end up in recovery mode and would provide a large number of non-relevant completions.
llvm-svn: 111818
show more ...
|
#
37ad551a |
| 23-Aug-2010 |
John McCall <rjmccall@apple.com> |
Sundry incremental steps towards killing off Action.
llvm-svn: 111795
|
#
48871651 |
| 21-Aug-2010 |
John McCall <rjmccall@apple.com> |
DeclPtrTy -> Decl *
llvm-svn: 111733
|
#
8b0666cf |
| 20-Aug-2010 |
John McCall <rjmccall@apple.com> |
Another step in the process of making the parser depend on Sema: - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includ
Another step in the process of making the parser depend on Sema: - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders.
llvm-svn: 111667
show more ...
|
#
00c37ef0 |
| 11-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Once code completion has completed, pass a "completion context" on to the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results.
Once code completion has completed, pass a "completion context" on to the code-completion consumer. The consumer can use this information to augument, filter, or display the code-completion results.
llvm-svn: 110858
show more ...
|
#
6e7e8cc1 |
| 22-Jul-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
atch for implementation of objective-c's -Wselector warning flag in clang. Little more to do for a PCH issue. Radar 6507158.
llvm-svn: 109129
|
#
45879695 |
| 08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Support code completion for parameter names in Objective-C method declarations.
llvm-svn: 107933
|
#
95887f9c |
| 08-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion point prior to an identifier in the selector of an Objective-C method declaration, e.g., given
- (int)first:(int)x second:(int)y;
this code completion point trigge
Introduce a new code-completion point prior to an identifier in the selector of an Objective-C method declaration, e.g., given
- (int)first:(int)x second:(int)y;
this code completion point triggers at the location of "second". It will provide completions that fill out the method declaration for any known method, anywhere in the translation unit.
llvm-svn: 107929
show more ...
|
#
0be31a2e |
| 02-Jul-2010 |
Douglas Gregor <dgregor@apple.com> |
Move the "current scope" state from the Parser into Action. This allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration t
Move the "current scope" state from the Parser into Action. This allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed.
Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack.
llvm-svn: 107491
show more ...
|
#
13d0568e |
| 16-Jun-2010 |
Douglas Gregor <dgregor@apple.com> |
Make the "extra ';' inside a struct or union" diagnostic more precise. Fixes PR7336.
llvm-svn: 106170
|
#
47054fbb |
| 31-May-2010 |
Chris Lattner <sabre@nondot.org> |
Minor tweaks on doug's objc recovery patch: the caller of isSimpleObjCMessageExpression checks the language, so change a dynamic check into an assert.
isSimpleObjCMessageExpression is expensive, so
Minor tweaks on doug's objc recovery patch: the caller of isSimpleObjCMessageExpression checks the language, so change a dynamic check into an assert.
isSimpleObjCMessageExpression is expensive, so only do it in the common case when it is likely to matter: when the [ of the postfix expr starts on a new line. This should avoid doing lookahead for every array expression.
llvm-svn: 105229
show more ...
|
#
990ccace |
| 31-May-2010 |
Douglas Gregor <dgregor@apple.com> |
When we see the a '[' in a postfix expression in Objective-C, perform a simple, quick check to determine whether the expression starting with '[' can only be an Objective-C message send. If so, don't
When we see the a '[' in a postfix expression in Objective-C, perform 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
show more ...
|
#
a817a19b |
| 27-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement a code-completion hook for the receiver of an Objective-C message. This completion gives better results than just using the "expression" completion, which is effectively what happened befor
Implement a code-completion hook for the receiver of an Objective-C message. This completion gives better results than just using the "expression" completion, which is effectively what happened before.
llvm-svn: 104895
show more ...
|
#
6da3db4a |
| 25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve code completion in failure cases in two ways: 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file.
Improve code completion in failure cases in two ways: 1) Suppress diagnostics as soon as we form the code-completion token, so we don't get any error/warning spew from the early end-of-file. 2) If we consume a code-completion token when we weren't expecting one, go into a code-completion recovery path that produces the best results it can based on the context that the parser is in.
llvm-svn: 104585
show more ...
|
#
25491a22 |
| 05-May-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
This patch deals with Sema Part of Setter/Getter synthesis of properties which are of C++ objects. Code Gen to follow (Radar 7468090).
llvm-svn: 103123
|
Revision tags: llvmorg-2.7.0 |
|
#
65654df9 |
| 26-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Cleanup error recovery for a missing '-'|'+' on a method declaration (radar 7822196).
llvm-svn: 102383
|
#
e11ee110 |
| 23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework Parser-Sema interface for Objective-C @catch exception object arguments. Rather than having the parser call ActOnParamDeclarator (which is a bit of a hack), call a new ActOnObjCExceptionDecl a
Rework Parser-Sema interface for Objective-C @catch exception object arguments. Rather than having the parser call ActOnParamDeclarator (which is a bit of a hack), call a new ActOnObjCExceptionDecl action. We'll be moving more functionality into this handler to perform earlier checking of @catch.
llvm-svn: 102222
show more ...
|
#
96c79498 |
| 23-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve the AST representation of Objective-C @try/@catch/@finally statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheles
Improve the AST representation of Objective-C @try/@catch/@finally statements. Instead of the @try having a single @catch, where all of the @catch's were chained (using an O(n^2) algorithm nonetheless), @try just holds an array of its @catch blocks. The resulting AST is slightly more compact (not important) and better represents the actual language semantics (good).
llvm-svn: 102221
show more ...
|
#
8d4de67e |
| 21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Implement parsing for message sends in Objective-C++. Message sends in Objective-C++ have a more complex grammar than in Objective-C (surprise!), because
(1) The receiver of an instance message ca
Implement parsing for message sends in Objective-C++. Message sends in Objective-C++ have a more complex grammar than in Objective-C (surprise!), because
(1) The receiver of an instance message can be a qualified name such as ::I or identity<I>::type. (2) Expressions in C++ can start with a type.
The receiver grammar isn't actually ambiguous; it just takes a bit of work to parse past the type before deciding whether we have a type or expression. We do this in two places within the grammar: once for message sends and once when we're determining whether a []'d clause in an initializer list is a message send or a C99 designated initializer.
This implementation of Objective-C++ message sends contains one known extension beyond GCC's implementation, which is to permit a typename-specifier as the receiver type for a class message, e.g.,
[typename compute_receiver_type<T>::type method];
Note that the same effect can be achieved in GCC by way of a typedef, e.g.,
typedef typename computed_receiver_type<T>::type Computed; [Computed method];
so this is merely a convenience.
Note also that message sends still cannot involve dependent types or values.
llvm-svn: 102031
show more ...
|
#
e5798dcb |
| 21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Migrate the responsibility for turning the receiver name in an Objective-C class message expression into a type from the parser (which was doing so in two places) to Action::getObjCMessageKind() whic
Migrate the responsibility for turning the receiver name in an Objective-C class message expression into a type from the parser (which was doing so in two places) to Action::getObjCMessageKind() which, in the case of Sema, reduces the number of name lookups we need to perform.
llvm-svn: 102026
show more ...
|
#
0c78ad96 |
| 21-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Rework the Parser-Sema interaction for Objective-C message sends. Major changes include:
- Expanded the interface from two actions (ActOnInstanceMessage, ActOnClassMessage), where ActOnClassMe
Rework the Parser-Sema interaction for Objective-C message sends. Major changes include:
- Expanded the interface from two actions (ActOnInstanceMessage, ActOnClassMessage), where ActOnClassMessage also handled sends to "super" by checking whether the identifier was "super", to three actions (ActOnInstanceMessage, ActOnClassMessage, ActOnSuperMessage). Code completion has the same changes. - The parser now resolves the type to which we are sending a class message, so ActOnClassMessage now accepts a TypeTy* (rather than an IdentifierInfo *). This opens the door to more interesting types (for Objective-C++ support). - Split ActOnInstanceMessage and ActOnClassMessage into parser action functions (with their original names) and semantic functions (BuildInstanceMessage and BuildClassMessage, respectively). At present, this split is onyl used by ActOnSuperMessage, which decides which kind of super message it has and forwards to the appropriate Build*Message. In the future, Build*Message will be used by template instantiation. - Use getObjCMessageKind() within the disambiguation of Objective-C message sends vs. array designators.
Two notes about substandard bits in this patch: - There is some redundancy in the code in ParseObjCMessageExpr and ParseInitializerWithPotentialDesignator; this will be addressed shortly by centralizing the mapping from identifiers to type names for the message receiver. - There is some #if 0'd code that won't likely ever be used---it handles the use of 'super' in methods whose class does not have a superclass---but could be used to model GCC's behavior more closely. This code will die in my next check-in, but I want it in Subversion.
llvm-svn: 102021
show more ...
|
#
15a81e59 |
| 20-Apr-2010 |
Ted Kremenek <kremenek@apple.com> |
Fix crash on invalid code where a @throw statement is not followed by a ';'
llvm-svn: 101941
|
#
b2ccf010 |
| 15-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Feed proper source-location information into Sema::LookupSingleResult, in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting
Feed proper source-location information into Sema::LookupSingleResult, in case it ends up doing something that might trigger diagnostics (template instantiation, ambiguity reporting, access reporting). Noticed while working on PR6831.
llvm-svn: 101412
show more ...
|
#
b5795c01 |
| 14-Apr-2010 |
Fariborz Jahanian <fjahanian@apple.com> |
Fix a -pedantic spurious warning involving @dynamic.
llvm-svn: 101284
|
#
a148a1d4 |
| 14-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a parsing action to distinguish between class, instance, and super message sends in Objective-C. No actual functionality change here, but it provides a hook so that Sema can typo-correct th
Introduce a parsing action to distinguish between class, instance, and super message sends in Objective-C. No actual functionality change here, but it provides a hook so that Sema can typo-correct the receiver in some cases.
llvm-svn: 101207
show more ...
|