| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
with incompatible pointer warnings in general).
llvm-svn: 56595
|
| |
|
|
| |
llvm-svn: 56438
|
| |
|
|
|
|
|
|
| |
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.
llvm-svn: 56288
|
| |
|
|
|
|
|
|
| |
^(expression) or ^(int arg1, float arg2)(expression)
...is no longer supported.
All block literals now require a compound statement.
llvm-svn: 56257
|
| |
|
|
|
|
| |
C++ conversion from a string literal to a pointer-to-non-const-character
llvm-svn: 56137
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Follow C99 behavior of using other operand type when one of
operands is a null pointer constant.
- Fix overenthusiastic devolving of any Objective-C types to id:
o If either operand has an Objective-C object type then:
- If both operands are interfaces and either operand can be
assigned to the other, use that type as the composite type.
- Otherwise, if either type is id, use id as the composite type.
- Otherwise, warn about incompatible types and use id as the
composite type.
- Return handling of qualified idea to separate test following
general pointer type checking.
o Upgraded from old code to allow devolving to id (without warning,
which matches GCC).
- <rdar://problem/6212771>
Add test case for issues fixed above, XFAIL though because it exposed
a new issue in property handling.
llvm-svn: 56135
|
| |
|
|
| |
llvm-svn: 56094
|
| |
|
|
| |
llvm-svn: 56064
|
| |
|
|
| |
llvm-svn: 56063
|
| |
|
|
|
|
| |
this weekend).
llvm-svn: 55862
|
| |
|
|
|
|
|
|
| |
check for block pointers.
Added a couple FIXME's wrt PointLikeType. If the author reads this, it would be great to get some background on this class (thanks in advance).
llvm-svn: 55778
|
| |
|
|
| |
llvm-svn: 55767
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Highlights...
- 4 new AST nodes, BlockExpr, BlockStmtExpr, BlockExprExpr, BlockDeclRefExpr.
- Sema::ActOnBlockStart(), ActOnBlockError(), ActOnBlockStmtExpr(), ActOnBlockExprExpr(), ActOnBlockReturnStmt().
Next steps...
- hack Sema::ActOnIdentifierExpr() to deal with block decl refs.
- add attribute handler for byref decls.
- add test cases.
llvm-svn: 55710
|
| |
|
|
|
|
|
| |
- Allow any Objective-C object types to devolve to type id in a ?:
expression. This matches gcc behavior more closely.
llvm-svn: 55705
|
| |
|
|
|
|
|
|
| |
- Now also searches for correct setter method.
- There are still some issues regarding validation of the setter
method and access of read-only properties.
llvm-svn: 55686
|
| |
|
|
|
|
|
| |
type-checking pointer subtraction; if the canonical types aren't used,
the qualifiers won't always get stripped off correctly.
llvm-svn: 55620
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Change Obj-C runtime message API, drop the ObjCMessageExpr arg in
favor of just result type and selector. Necessary so it can be
reused in situations where we don't want to cons up an
ObjCMessageExpr.
- Update aggregate binary assignment to know about special property
ref lvalues.
- Add CodeGenFunction::EmitCallArg overload which takes an already
emitted rvalue.
Add CodeGenFunction::StoreComplexIntoAddr.
Disabled logic in Sema for parsing Objective-C dot-syntax that
accesses methods. This code does not search in the correct order and
the AST node has no way of properly representing its results.
Updated StmtDumper to print a bit more information about
ObjCPropertyRefExprs.
llvm-svn: 55561
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of RHSs to id type instead of void* if either has Objective-C object
type.
- This ensures the result can still be used in normal places an
object can be used, like a message send.
Add implicit conversions for ?: applied to qualified id types to
ensure that the RHSs are compatible.
- This prevents a codegen crash (creating invalid PHI nodes).
- Again, this relates to the fact that qualified id types have no
canonical types.
- Note that the implicit type casted to is incorrect, however this
doesn't currently cause problems because of the flexibility of the
id type.
Test cases for above.
llvm-svn: 55346
|
| |
|
|
|
|
|
|
|
|
|
|
| |
testing compatibility. This is necessary for some constructs, like merging
redeclarations.
Also, there are some ObjC changes to make sure that
typesAreCompatible(a,b) == typesAreCompatible(b,a). I don't have any
ObjC code beyond the testsuite, so please tell me if there are any cases
where this doesn't behave as expected.
llvm-svn: 55158
|
| |
|
|
|
|
| |
"+=".
llvm-svn: 55131
|
| |
|
|
| |
llvm-svn: 55083
|
| |
|
|
|
|
|
|
|
| |
- UsualUnaryConversions takes an Expr *& and may modify its argument,
this broke when it was refactored into Sema::CheckCastTypes. This
meant that we were missing implicit casts in some places.
- Seems pretty sad that this got through our tests.
llvm-svn: 55039
|
| |
|
|
|
|
|
|
|
|
|
| |
ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr
llvm-svn: 54955
|
| |
|
|
|
|
| |
Sema::CheckCastTypes function so that it can be reused.
llvm-svn: 54852
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).
Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.
llvm-svn: 54794
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and put the caret on the ()'s. e.g. produces:
t.c:13:9: error: called object is not a function or function pointer
((B)a)();
~~~~~~^
instead of:
t.c:13:3: error: called object is not a function or function pointer
((B)a)();
^~~~~~~~
llvm-svn: 54775
|
| |
|
|
|
|
|
|
|
|
|
| |
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.
llvm-svn: 54632
|
| |
|
|
|
|
|
|
| |
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).
llvm-svn: 54629
|
| |
|
|
|
|
|
| |
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
implementation .cpp
llvm-svn: 54626
|
| |
|
|
| |
llvm-svn: 54617
|
| |
|
|
| |
llvm-svn: 54605
|
| |
|
|
| |
llvm-svn: 54600
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 54588
|
| |
|
|
|
|
|
|
|
|
|
| |
- clang was erroneously accepting address-of applied to lvalue
expressions involving pointer arithmetic.
- clang was erroneously rejecting address-of applied to deref
expressions of pointer-typed variables.
- Improved existing test case.
- Fixes: <rdar://problem/6113867>, <rdar://problem/6080158>
llvm-svn: 54326
|
| |
|
|
|
|
|
|
|
|
| |
- Follows emission scheme used by llvm-gcc, i.e. invent an id for
each label whose address is taken and replace each indirect goto by
a switch to each possible target.
- Currently we emit a switch for each indirect goto instead of
merging them as llvm-gcc does.
llvm-svn: 54318
|
| |
|
|
|
|
|
|
|
|
| |
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).
Fixing this greatly simplifies getArrayDecayedType, which is a good sign.
llvm-svn: 54317
|
| |
|
|
|
|
| |
with QualTypes and Types.
llvm-svn: 54116
|
| |
|
|
|
|
| |
ASTContext::getCanonicalType instead (PR2189)
llvm-svn: 54105
|
| |
|
|
|
|
| |
of doing it directly. This is required for PR2189.
llvm-svn: 54102
|
| |
|
|
|
|
| |
improve 'expression unused' diagnostics for stmtexprs.
llvm-svn: 54098
|
| |
|
|
|
|
| |
as well as complex float. rdar://6097730
llvm-svn: 54080
|
| |
|
|
| |
llvm-svn: 54069
|
| |
|
|
|
|
|
|
|
| |
problem with &&/||. 2) use canonical types for comparison instead
of raw types. 3) emit an ext-warn for a gnu extension.
Also simplify the code to make it less nested.
llvm-svn: 54068
|
| |
|
|
| |
llvm-svn: 54066
|
| |
|
|
|
|
|
|
| |
lvalue. This
is different than C99. This fixes the rest of rdar://6095180.
llvm-svn: 54064
|
| |
|
|
| |
llvm-svn: 54063
|
| |
|
|
|
|
| |
it does not do unary promotions (like short->int).
llvm-svn: 54058
|
| |
|
|
| |
llvm-svn: 54045
|
| |
|
|
|
|
| |
@implementation to resolve nullary selector references.
llvm-svn: 53845
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have better source ranges. Before:
t.m:11:53: error: member reference is not to a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
^~~~~~~
after:
t.m:11:54: error: member reference base type ('id') is not a structure or union
CGFloat maxOffsetY = [_outlineLayer contentSize].height - [_outlineLayer frame].size.height;
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
llvm-svn: 53834
|