| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
warning when multiple method declarations are found in global pool
with differing types and some are available.
rdar://20408445
llvm-svn: 234328
|
|
|
|
|
|
|
|
|
| |
A simple case of asserting isFunctionOrMethod when we should have
asserted isFunctionOrMethodOrBlock.
This fixes PR23117.
llvm-svn: 234297
|
|
|
|
|
|
|
| |
to 'super' of instance/class methods and not assert.
rdar://20350364
llvm-svn: 233642
|
|
|
|
|
|
|
| |
warning until Xcode removes the warning setting.
rdar://20262140
llvm-svn: 233093
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This warns when using decls that are not available on all deployment targets.
For example, a call to
- (void)ppartialMethod __attribute__((availability(macosx,introduced=10.8)));
will warn if -mmacosx-version-min is set to less than 10.8.
To silence the warning, one has to explicitly redeclare the method like so:
@interface Whatever(MountainLionAPI)
- (void)ppartialMethod;
@end
This way, one cannot accidentally call a function that isn't available
everywhere. Having to add the redeclaration will hopefully remind the user
to add an explicit respondsToSelector: call as well.
Some projects build against old SDKs to get this effect, but building against
old SDKs suppresses some bug fixes -- see http://crbug.com/463171 for examples.
The hope is that SDK headers are annotated well enough with availability
attributes that new SDK + this warning offers the same amount of protection
as using an old SDK.
llvm-svn: 232750
|
|
|
|
|
|
| |
several projects. rdar://20120666.
llvm-svn: 231939
|
|
|
|
|
|
|
| |
It is incorrect and better warning is issued under
-Warc-repeated-use-of-weak. rdar://16316934.
llvm-svn: 231851
|
|
|
|
|
|
| |
Fixes <rdar://20107345>.
llvm-svn: 231814
|
|
|
|
|
|
|
| |
override where at least a declaration of a designated initializer is in a super
class and not necessarily in the current class. rdar://19653785.
llvm-svn: 231700
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds new warning to prevent user from creating 'circular containers'.
Mutable collections from NSFoundation allows user to add collection to itself, e.g.:
NSMutableArray *a = [NSMutableArray new];
[a addObject:a];
The code above leads to really weird behaviour (crashes, 'endless' recursion) and
retain cycles (collection retains itself) if ARC enabled.
Patch checks the following collections:
- NSMutableArray,
- NSMutableDictionary,
- NSMutableSet,
- NSMutableOrderedSet,
- NSCountedSet.
llvm-svn: 231265
|
|
|
|
| |
llvm-svn: 230795
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we allowed these casts only for constants declared in system
headers, which we assume are retain/release-neutral. Now also allow them
for constants in user headers, treating them as +0. Practically, this
means that we will now allow:
id x = (id)kMyGlobalConst;
But unlike with system headers we cannot mix them with +1 values:
id y = (id)(b ? kMyGlobalConst : [Obj newValAtPlusOne]); // error
id z = (id)(b ? kSystemGlobalConst: [Obj newValAtPlusOne]); // OK
Thanks to John for suggesting this improvement.
llvm-svn: 230534
|
|
|
|
|
|
|
| |
can take a "const char*" format but supports standard printf
and CF/NS types . rdar://19904147
llvm-svn: 230109
|
|
|
|
|
|
|
| |
property accessors in @selector not implemented
because they will be auto-synthesized. rdar://16607480
llvm-svn: 229919
|
|
|
|
| |
llvm-svn: 229470
|
|
|
|
|
|
|
| |
warning when property getter is used in direct method call
and return value of property is unused. rdar://19773512
llvm-svn: 229458
|
|
|
|
|
|
|
|
|
|
|
| |
Bug report: http://llvm.org/bugs/show_bug.cgi?id=22561
Clang tries to create ObjCBoxedExpression of type 'NSNumber'
when 'NSNumber' has only forward declaration, this cause a crash later,
when 'Sema' refers to a nil QualType of the whole expression.
Please, refer to the bug report for the better explanation.
llvm-svn: 229402
|
|
|
|
|
|
|
|
|
|
| |
__declspec(restrict) and __attribute(malloc) are both handled
identically by clang: they are allowed to the noalias LLVM attribute.
Seeing as how noalias models the C99 notion of 'restrict', rename the
internal clang attribute to Restrict from Malloc.
llvm-svn: 228120
|
|
|
|
|
|
| |
rdar://19678874
llvm-svn: 227774
|
|
|
|
|
|
|
| |
In a few places we didn't check that Category->getClassInterface() was
not null before using it.
llvm-svn: 226605
|
|
|
|
|
|
|
| |
property-dot syntax on 'super' with no super
class. Patch by Jason Haslam.
llvm-svn: 226578
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As mentioned in the previous commit, if a property (declared with @property)
has a name that matches a special Objective-C method family, the getter picks
up that family despite being declared by the property. The most correct way
to solve this problem is to add the 'objc_method_family' attribute to the
getter with an argument of 'none', which unfortunately requires an explicit
declaration of the getter.
This commit adds a note to the existing error (ARC) or warning (MRR) for
such a poorly-named property that suggests the solution; if there's already
a declaration of the getter, it even includes a fix-it.
llvm-svn: 226339
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes PR21587, what r221933 fixed for regular programs is now also
fixed for decls coming from PCH files.
Use another bit from the count/bits uint16_t for storing the "more than one
decl" bit. This reduces the number of bits for the count from 14 to 13.
The selector with the most overloads in Cocoa.h has ~55 overloads, so 13 bits
should still be plenty. Since this changes the meaning of a serialized bit
pattern, also increase clang::serialization::VERSION_MAJOR.
Storing the "more than one decl" state of only the first overload isn't quite
correct, but Sema::AreMultipleMethodsInGlobalPool() currently only looks at
the state of the first overload so it's good enough for now.
llvm-svn: 224892
|
|
|
|
|
|
|
| |
Don't warn when a selector has an unavailable and an available variant,
and the first also has an implementation.
llvm-svn: 224881
|
|
|
|
|
|
|
| |
The behavior looks incorrect to me, but the test is supposed to document
current behavior for now.
llvm-svn: 224875
|
|
|
|
|
|
|
| |
I broke this case in a local patch I'm writing, and there was no test to stop
me. Now there is.
llvm-svn: 224873
|
|
|
|
|
|
|
| |
on multiple selector names found during lookup.
rdar://19265296
llvm-svn: 224536
|
|
|
|
|
|
|
|
| |
So, place warning about property getter should not be used for side-effect
under its own group so warning can be turned off.
rdar://19137815
llvm-svn: 224479
|
|
|
|
|
|
|
|
|
|
| |
objc_bridge(id).
This means that a pointer to the struct type to which the attribute appertains
is a CF type (and therefore an Objective-C object of some type), but not of any
specific class. rdar://19157264
llvm-svn: 224072
|
|
|
|
|
|
| |
whose base is not an expression. rdar://19053620
llvm-svn: 222570
|
|
|
|
|
|
| |
for a typedef before arithmetic conversion in all rare corner cases.
llvm-svn: 222049
|
|
|
|
|
|
|
|
| |
of new warning for deprecated method call for receiver
of type 'id'. This addresses rdar://18960378 where
unintended warnings being issued.
llvm-svn: 221933
|
|
|
|
|
|
| |
with objc stuff will be resolved.
llvm-svn: 221829
|
|
|
|
| |
llvm-svn: 221824
|
|
|
|
| |
llvm-svn: 221568
|
|
|
|
|
|
|
| |
there is a uinque method found when message is sent to receiver
of 'id' type. // rdar://18848183
llvm-svn: 221562
|
|
|
|
|
|
| |
Simply marking the symbol private conveys the desire to hide them to LLVM.
llvm-svn: 221451
|
|
|
|
|
|
|
|
|
| |
This is to accept "NA" in place of vesion number for availability
attribute. Used on introduced=NA to mean unavailable
and deprecated=NA to mean nothing (not deprecated).
rdar://18804883
llvm-svn: 221417
|
|
|
|
| |
llvm-svn: 220812
|
|
|
|
| |
llvm-svn: 220803
|
|
|
|
| |
llvm-svn: 220802
|
|
|
|
|
|
| |
to error. rdar://18768214.
llvm-svn: 220740
|
|
|
|
|
|
| |
to C type a collection literal. rdar://18768214
llvm-svn: 220727
|
|
|
|
|
|
|
|
| |
Objective-C pointer types. In this case, checker incorrectly
claims incompatible pointer types if redundant protocol conformance
is specified. rdar://18491222
llvm-svn: 219630
|
|
|
|
|
|
|
|
| |
auto synthesized because it is synthesized in its super
class. locate property declaration in super class
which will default synthesize the property. rdar://18488727
llvm-svn: 219535
|
|
|
|
|
|
|
|
|
| |
in availability attribute by preserving this info.
in VersionTuple and using it in pretty printing of attributes
and yet using '.' as separator when diagnosing unavailable
message calls. rdar://18490958
llvm-svn: 219124
|
|
|
|
|
|
| |
separators in my previous patch.
llvm-svn: 218895
|
|
|
|
|
|
|
| |
number separator in "availability" attribute.
rdar://18490958
llvm-svn: 218884
|
|
|
|
|
|
|
|
|
| |
off by default, issue a warning if %s directive is used
in formart argument of a function/method declared as
__attribute__((format(CF/NSString, ...)))
To complete rdar://18182443
llvm-svn: 217619
|
|
|
|
| |
llvm-svn: 217555
|