| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
forming composite ObjC pointer types in comparisons.
|
|
|
|
|
|
|
| |
No functional change intended, except that we will now produce more
"declared here" notes.
llvm-svn: 339187
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables in a block
The fixit is actively harmful, as it encourages developers to ignore the
warning and to write unsafe code.
It is almost impossible to write safe code while capturing autoreleasing
variables in the block, as in order to check that the block is never
called in the autoreleasing pool the developer has to check the
transitive closure of all potential callers of the block.
Differential Revision: https://reviews.llvm.org/D46778
llvm-svn: 332288
|
|
|
|
|
|
|
|
|
| |
The '__autoreleasing' keyword should be inserted after the Objective-C pointer
type.
rdar://30123548
llvm-svn: 295381
|
|
|
|
|
|
|
|
|
|
| |
Turning on the warning by default helps the users as it's a common
mistake to capture out-parameters in a block without ensuring the object
assigned doesn't get released.
rdar://problem/30200058
llvm-svn: 293199
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
even in the presence of nullability qualifiers.
This commit fixes bugs in r285031 where -Wblock-capture-autoreleasing
wouldn't issue warnings when the function parameters were annotated
with nullability qualifiers. Specifically, look through the sugar and
see if there is an AttributedType of kind attr_objc_ownership to
determine whether __autoreleasing was explicitly specified or implicitly
added by the compiler.
rdar://problem/30193488
llvm-svn: 293194
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by blocks.
Add a new warning "-Wblock-capture-autoreleasing". The warning warns
about implicitly autoreleasing out-parameters captured by blocks which
can introduce use-after-free bugs that are hard to debug.
rdar://problem/15377548
Differential Revision: https://reviews.llvm.org/D25844
llvm-svn: 285031
|
|
|
|
| |
llvm-svn: 250917
|
|
|
|
|
|
| |
Discussed with Richard Smith.
llvm-svn: 245162
|
|
|
|
|
|
|
|
|
|
| |
Previously, many error messages would simply be "read-only variable is not
assignable" This change provides more information about why the variable is
not assignable, as well as note to where the const is located.
Differential Revision: http://reviews.llvm.org/D4479
llvm-svn: 234677
|
|
|
|
| |
llvm-svn: 220812
|
|
|
|
|
|
|
|
| |
"protected scope" is very unhelpful here and actively confuses users. Instead,
simply state the nature of the problem in the diagnostic: we cannot jump from
here to there. The notes explain nicely why not.
llvm-svn: 217293
|
|
|
|
|
|
|
| |
for building Objective-C array literals in ARC
mode. rdar://17554063
llvm-svn: 215232
|
|
|
|
|
|
|
| |
to use non-retain/autorelease API variants of ObjC objects. wip.
rdar://17554063
llvm-svn: 215146
|
|
|
|
|
|
| |
new APIs for literals. nfc. wip. rdar://17554063
llvm-svn: 215043
|
|
|
|
|
|
|
|
| |
retainable ObjC pointers without requiring a bridge-cast
in the context of pointer comparison as this is in effect
a +0 context. // rdar://16627903
llvm-svn: 211243
|
|
|
|
| |
llvm-svn: 211237
|
|
|
|
|
|
|
| |
retainable ObjC pointers without requiring a bridge-cast
by recognizing this as a +0 context. // rdar://16627903
llvm-svn: 211234
|
|
|
|
|
|
|
|
| |
the fereach loop must be a non-const lvalue expression as
it will be assigned to at the beginning of the loop.
// rdar://15123684
llvm-svn: 192399
|
|
|
|
|
|
| |
argument list.
llvm-svn: 189711
|
|
|
|
|
|
|
|
|
|
|
|
| |
the selector family
Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method.
CC: cfe-commits, eli.friedman
Differential Revision: http://llvm-reviews.chandlerc.com/D1163
llvm-svn: 186718
|
|
|
|
|
|
|
|
| |
in addition of receiver having static type, but also when
receiver has dynamic type (of 'id' variety) as well as when
receiver is of 'Class' type vareity. // rdar://7853549
llvm-svn: 184195
|
|
|
|
|
|
|
| |
in the diagnostics. Remove them when reporting incompatible
Objective-C pointer types. // rdar://13752880.
llvm-svn: 180765
|
|
|
|
|
|
|
| |
decay the parameter type immediately; let CheckParameter() do its
job. Fixes <rdar://problem/12071218>.
llvm-svn: 172780
|
|
|
|
|
|
|
|
|
|
| |
Along the way, fix a bug in CheckLiteralKind(), previously in diagnoseObjCLiteralComparison, where we didn't ignore parentheses
in boxed expressions for purpose of classification.
In other words, both @42 and @(42) should be classified as numeric
literals.
llvm-svn: 170931
|
|
|
|
|
|
|
|
|
|
| |
weak reference.
Thanks to Jordan Rose and John McCall for their sage code review.
Fixes <rdar://problem/12569201>.
llvm-svn: 170864
|
|
|
|
|
|
|
|
| |
literal."
Per code feedback, I want to see if there is a more general way to do this.
llvm-svn: 170777
|
|
|
|
|
|
|
|
|
| |
Such variables may immediately become nil or may have unpredictable
behavior.
Fixes <rdar://problem/12569201>.
llvm-svn: 170763
|
|
|
|
| |
llvm-svn: 160895
|
|
|
|
|
|
|
|
| |
retainable types in arc, only suggest CFBridgingRelease/
CFBridgingRetain and not the confusing __bridge casts.
// rdar://11923822
llvm-svn: 160839
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 160516
|
|
|
|
|
|
|
| |
a 'weak' property just as we do the same for
'weak' variables. // rdar://11814185
llvm-svn: 159859
|
|
|
|
|
|
|
|
|
| |
root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>
llvm-svn: 154187
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
or __strong __typeof__(some.strong.thing).
llvm-svn: 150029
|
|
|
|
|
|
| |
changing the diagnostic. Also use correct spelling for both.
llvm-svn: 149554
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:
// expect-error{{candidate function has different number of parameters}}
will match the following error messages from Clang:
candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters
It will also match these other error messages:
candidate function
function has different number of parameters
number of parameters
This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:
87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)
llvm-svn: 146619
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
type is strong by default too. // rdar://10410903
llvm-svn: 144118
|
|
|
|
|
|
| |
with ns_consumes_self. Fixes <rdar://problem/10274056>.
llvm-svn: 142909
|
|
|
|
|
|
|
| |
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.
llvm-svn: 142219
|
|
|
|
|
|
| |
found in receiver's class. // rdar://9970739
llvm-svn: 141961
|
|
|
|
|
|
| |
functions. // rdar://10186536
llvm-svn: 141037
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.
This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.
Most, though, it involved a perl script to translate a ton
of test cases.
Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.
llvm-svn: 140957
|
|
|
|
| |
llvm-svn: 140212
|
|
|
|
|
|
| |
specified. // rdar://9971982
llvm-svn: 138062
|
|
|
|
|
|
|
|
|
|
| |
ActOnStartOfSwitchStmt (i.e. before binding up a full-expression)
instead of ActOnFinishSwitchStmt.
Among other things, this means that property l-values are properly
converted inside the full-expression.
llvm-svn: 137014
|
|
|
|
| |
llvm-svn: 136658
|
|
|
|
|
|
|
|
|
|
| |
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493
llvm-svn: 136426
|