| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
objc2's @synthesize and @dynamic.
llvm-svn: 41667
|
|
|
|
|
|
|
|
|
|
| |
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:
int maxval_stmt_expr(int x, int y) {
return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}
llvm-svn: 41655
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Log:
Implement parsing of objective-c's new @property declaration.
Modified:
include/clang/Basic/DiagnosticKinds.def
include/clang/Parse/Parser.h
Parse/ParseObjc.cpp
Parse/Parser.cpp
llvm-svn: 41644
|
|
|
|
| |
llvm-svn: 41638
|
|
|
|
| |
llvm-svn: 41637
|
|
|
|
| |
llvm-svn: 41612
|
|
|
|
|
|
| |
primary expressions.
llvm-svn: 41607
|
|
|
|
| |
llvm-svn: 41606
|
|
|
|
| |
llvm-svn: 41583
|
|
|
|
| |
llvm-svn: 41542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
types.
For example, the following code was resulting in spurious warnings. This was the result of
Sema::GetTypeForDeclarator() synthesizing a type to hand back to the caller (in this case,
"int []", instead of "struct s[]", which is invalid).
struct s;
struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}}
return z;
}
Strategy: Flag the error in Declarator/DeclaratorChunk. This info is later stored in
the ParmVarDecl. If the decl is referenced, Sema::ParseIdentifierExpr() will check if
the type is invalid. If so, it quietly returns "true", without instantiating a DeclRefExpr.
This seems to work nicely. If Chris is happy with the approach, I will generalize this to
all VarDecls.
llvm-svn: 41521
|
|
|
|
| |
llvm-svn: 41498
|
|
|
|
| |
llvm-svn: 41477
|
|
|
|
| |
llvm-svn: 41473
|
|
|
|
| |
llvm-svn: 41471
|
|
|
|
|
|
|
|
| |
hold declarations. Instead, introduce a new "DeclScope" scope type that
holds them explicitly. For now, all scopes have this bit, but in the
future we can use them to fix some issues Neil noticed.
llvm-svn: 41431
|
|
|
|
| |
llvm-svn: 41403
|
|
|
|
|
|
| |
ignore 'namespace foo {}'
llvm-svn: 41400
|
|
|
|
| |
llvm-svn: 41399
|
|
|
|
|
|
| |
- Use getLang().ObjC2 when appropriate.
llvm-svn: 41333
|
|
|
|
|
|
| |
Convert all clients to the new cleaner, more robust API.
llvm-svn: 41330
|
|
|
|
|
|
| |
for a right parenthesis when parsing @encode() and @protocol().
llvm-svn: 41321
|
|
|
|
| |
llvm-svn: 41320
|
|
|
|
| |
llvm-svn: 41303
|
|
|
|
|
|
| |
Now we can parse quite a bit of "Foundation.h" (a couple bugs remain).
llvm-svn: 41300
|
|
|
|
|
|
| |
Next step...starting installing class names into the type namespace (so we can start parsing Cocoa headers).
llvm-svn: 41283
|
|
|
|
|
|
|
|
|
|
| |
@interface).
Still need to finish Parser::ParseObjCMethodDecl(). Before I do, I need to do a minor
refactoring of ParseDeclarationOrFunctionDefinition(), to disallow function definitions.
At the moment, @inteface allows function defs (which is incorrect).
llvm-svn: 41275
|
|
|
|
| |
llvm-svn: 41273
|
|
|
|
| |
llvm-svn: 41267
|
|
|
|
| |
llvm-svn: 41265
|
|
|
|
|
|
|
| |
the selection statements and iteration statements. Add
spec citations.
llvm-svn: 41264
|
|
|
|
|
|
| |
This fixes test/Parser/control-scope.c
llvm-svn: 41263
|
|
|
|
|
|
| |
Next step, method...
llvm-svn: 41251
|
|
|
|
| |
llvm-svn: 41245
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
void foo() {
int x
if (x) {
}
}
We now emit:
a.c:5:3: error: parse error
if (x) {
^
1 diagnostic generated.
instead of:
a.c:5:3: error: parse error
if (x) {
^
a.c:9:1: error: expected '}'
^
2 diagnostics generated.
llvm-svn: 41243
|
|
|
|
| |
llvm-svn: 41241
|
|
|
|
| |
llvm-svn: 41238
|
|
|
|
|
|
|
|
|
| |
Parser::ParseStructUnionBody().
Motivation: Objective-C can now share this rule. It also makes Parser::ParseStructUnionBody()
a bit smaller/cleaner..
llvm-svn: 41201
|
|
|
|
|
|
|
| |
Next step, refactor Parser::ParseStructUnionBody() so that struct declarations can
be shared with Objective-C (for declaring instance variables).
llvm-svn: 41200
|
|
|
|
| |
llvm-svn: 41004
|
|
|
|
| |
llvm-svn: 40963
|
|
|
|
| |
llvm-svn: 40962
|
|
|
|
| |
llvm-svn: 40794
|
|
|
|
| |
llvm-svn: 40713
|
|
|
|
|
|
| |
- Fix type printing code for recently added TypeOfExpr/TypeOfType.
llvm-svn: 40700
|
|
|
|
|
|
| |
Todo...still need to call the action from the parser...
llvm-svn: 40693
|
|
|
|
|
|
| |
Add some more tests to typeof.c. Also added a couple of missing "expect" attributes that caused the test to fail.
llvm-svn: 40656
|
|
|
|
|
|
|
| |
Many small changes to lot's of files.
Still some FIXME's, however the basic support is in place.
llvm-svn: 40631
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Fix a todo in Parser::ParseTag, to recover better. On code like
that in test/Sema/decl-invalid.c it causes us to return a single
error instead of multiple.
2. Fix an error in Sema::ParseDeclarator, where it would crash if the
declarator didn't have an identifier. Instead, diagnose the problem.
3. Start adding infrastructure to track the range of locations covered
by a declspec or declarator. This is mostly implemented for declspec,
but could be improved, it is missing for declarator.
Thanks to Neil for pointing out this crash.
llvm-svn: 40482
|
|
|
|
| |
llvm-svn: 40466
|