| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
This was a problem for people who write 'return(result);'
Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.
<rdar://problem/11577346>
llvm-svn: 158130
|
|
|
|
|
|
|
| |
message receiver is 'weak' property.
// rdar://10225276
llvm-svn: 157946
|
|
|
|
|
|
|
|
|
|
| |
__bridge_retained/__bridge_transfer
when migrating.
rdar://11569198
llvm-svn: 157785
|
|
|
|
|
|
| |
and reported as PR12959. // rdar://11499742
llvm-svn: 157697
|
|
|
|
|
|
|
|
| |
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://11528439, [PR12936].
llvm-svn: 157435
|
|
|
|
|
|
|
|
|
| |
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://11363363
llvm-svn: 157407
|
|
|
|
| |
llvm-svn: 157117
|
|
|
|
|
|
| |
getFETokenInfoAsVoid into its only caller.
llvm-svn: 157116
|
|
|
|
|
|
|
|
|
| |
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://11190837
llvm-svn: 156890
|
|
|
|
|
|
|
|
|
|
| |
Previously we would reject it as illegal using a value of
enum type and on ObjC++ it was illegal to use an enumerator
as well.
rdar://11454917
llvm-svn: 156843
|
|
|
|
|
|
|
|
| |
Once we've found a "good" method, we don't need to check its argument types
again. (Even if we might have later found a "bad" method, we were already
caching the method we first looked up.)
llvm-svn: 156719
|
|
|
|
| |
llvm-svn: 156718
|
|
|
|
| |
llvm-svn: 156717
|
|
|
|
|
|
|
|
| |
Also, unify some diagnostics for boxed expressions that have the same form.
Fixes PR12804.
llvm-svn: 156713
|
|
|
|
|
|
|
|
|
|
|
| |
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.
llvm-svn: 156176
|
|
|
|
|
|
|
|
|
|
|
|
| |
BuildObjCNumericLiteral() and BuildObjCBoxedExpr() now both using
PerformCopyInitialization() rather than PerformImplicitConversion(),
which suppresses errors.
In BuildObjCBoxedExpr(): no longer calling .getCanonicalType(),
ValueType->getAs() will remove the minimal amount of sugar.
Using ValueType->isBuiltinType() instead of isa<BuiltinType>(ValueType).
llvm-svn: 155949
|
|
|
|
|
|
|
| |
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276
llvm-svn: 155169
|
|
|
|
|
|
|
| |
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276
llvm-svn: 155159
|
|
|
|
| |
llvm-svn: 155082
|
|
|
|
|
|
|
| |
in arc mode and opted-in with -Wreceiver-is-weak flag.
// rdar://10225276
llvm-svn: 154042
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
|
|
|
|
|
| |
mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.
llvm-svn: 151579
|
|
|
|
|
|
| |
// rdar://10907410
llvm-svn: 151296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
eliminating a bunch of redundant code and properly modeling how the
captures of outside blocks/lambdas affect the types seen by inner
captures.
This new scheme makes two passes over the capturing scope stack. The
first pass goes up the stack (from innermost to outermost), assessing
whether the capture looks feasible and stopping when it either hits
the scope where the variable is declared or when it finds an existing
capture. The second pass then walks down the stack (from outermost to
innermost), capturing the variable at each step and updating the
captured type and the type that an expression referring to that
captured variable would see. It also checks type-specific
restrictions, such as the inability to capture an array within a
block. Note that only the first odr-use of each
variable needs to do the full walk; subsequent uses will find the
capture immediately, so multiple walks need not occur.
The same routine that builds the captures can also compute the type of
the captures without signaling errors and without actually performing
the capture. This functionality is used to determine the type of
declaration references as well as implementing the weird decltype((x))
rule within lambda expressions.
The capture code now explicitly takes sides in the debate over C++
core issue 1249, which concerns the type of captures within nested
lambdas. We opt to use the more permissive, more useful definition
implemented by GCC rather than the one implemented by EDG.
llvm-svn: 150875
|
|
|
|
|
|
|
|
|
|
| |
rdar://10289283
Also fix the fixit (oh the irony) when it uses CFBridgingRetain/CFBridgingRelease;
they are supposed to be calls with the casted expression as parameter, they should
not be inserted into the cast like the __bridge keywords.
llvm-svn: 150705
|
|
|
|
|
|
|
|
|
| |
used so profusely
in many APIs and large codebases that this made the deprecated warning trigger happy to
the point of not being useful.
llvm-svn: 150223
|
|
|
|
|
|
|
| |
(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)
llvm-svn: 149799
|
|
|
|
|
|
| |
Still left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.
llvm-svn: 149718
|
|
|
|
|
|
|
| |
it is treated as of 'id' type resulting in multiple method lookup.
// rdar://10686120
llvm-svn: 149653
|
|
|
|
|
|
| |
changing the diagnostic. Also use correct spelling for both.
llvm-svn: 149554
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Actually building the var -> capture mapping properly (there was an off-by-one error)
- Keeping track of the source location of each capture
- Minor QoI improvements, e.g, highlighing the prior capture if
there are multiple captures, pointing at the variable declaration we
found if we reject it.
As part of this, add standard citations for the various semantic
checks we perform, and note where we're not performing those checks as
we should.
llvm-svn: 149462
|
|
|
|
| |
llvm-svn: 149451
|
|
|
|
|
|
|
|
| |
CFBridgingRetain/CFBridgingRelease calls instead
of __bridge_retained/__bridge_transfer casts as preferred
way of moving cf objects to arc land. // rdar://10207950
llvm-svn: 149449
|
|
|
|
|
|
|
| |
PR 10274: format function attribute with the NSString archetype yields no compiler warnings
PR 10275: format function attribute isn't checked in Objective-C methods
llvm-svn: 148324
|
|
|
|
|
|
|
| |
objects, and add a basic CorrectionCandidateCallback template class
to simplify the fixups.
llvm-svn: 148085
|
|
|
|
|
|
|
|
|
|
| |
was constructed, e.g. for a property access.
This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.
llvm-svn: 148013
|
|
|
|
|
|
| |
shared between lambda expressions and block literals.
llvm-svn: 147917
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.
Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.
llvm-svn: 146644
|
|
|
|
|
|
|
| |
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930
llvm-svn: 145999
|
|
|
|
|
|
|
| |
force the unknown any type to "id" so that the message send can be
completed without requiring a case. Fixes <rdar://problem/10506646>.
llvm-svn: 145552
|
|
|
|
|
|
|
|
|
|
| |
Objective-C classes. This has two purposes: to consistently provide
"forward declaration here" notes when we hit an incomplete type, and
to give LLDB a chance to complete the type.
RequireCompleteType bits from Sean Callanan!
llvm-svn: 144573
|
|
|
|
| |
llvm-svn: 144150
|
|
|
|
| |
llvm-svn: 143910
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.
Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.
I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.
llvm-svn: 143867
|
|
|
|
|
|
|
| |
ownership qualifier cast which won't work.
// rdar://10244607
llvm-svn: 143258
|
|
|
|
|
|
|
| |
an rvalue retainable object type with life-time qualifier has no
effect and wil be diagnosed as error. // rdar://10244607
llvm-svn: 143219
|
|
|
|
|
|
| |
GCC compiler workaround.
llvm-svn: 142931
|
|
|
|
|
|
| |
r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
llvm-svn: 142914
|