summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* Objective-C. Accept 'nil' as indexing argument toFariborz Jahanian2014-09-101-0/+10
| | | | | | | dictionary literals since the API which implements them accepts it too. // rdar://18254621 llvm-svn: 217543
* Objective-C arc. Fixes a crash when issuing diagnostic forFariborz Jahanian2014-09-101-0/+24
| | | | | | passing parameter to an audited CF API. rdar://18222007 llvm-svn: 217530
* Objective-C. Under a special flag, -Wcstring-format-directive,Fariborz Jahanian2014-09-091-0/+60
| | | | | | | | off by default, issue a warning if %s directive is used in certain CF/NS formatting APIs, to assist user in deprecating use of such %s in these APIs. rdar://18182443 llvm-svn: 217467
* Reword switch/goto diagnostics "protected scope" diagnostics. Making up a termRichard Smith2014-09-064-20/+20
| | | | | | | | "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
* Objective-C [qoi]. If property is going to be implementedFariborz Jahanian2014-08-291-2/+16
| | | | | | | | in the super class, do not issue the warning about property in current class's protocol will not be auto synthesized. // rdar://18179833 llvm-svn: 216769
* Objective-C. Tweak diagnosing properties that are not auto-synthesized.Fariborz Jahanian2014-08-295-11/+31
| | | | | | | | | | | Do not warn when property declared in class's protocol will be auto-synthesized by its uper class implementation because super class has also declared this property while this class has not. Continue to warn if current class has declared the property also (because this declaration will not result in a 2nd synthesis). rdar://18152478 llvm-svn: 216753
* Objective-C. Change to method lookup rules to lookFariborz Jahanian2014-08-271-0/+17
| | | | | | | | | | into primary class's named categories before looking into their protocols. This is because categories are part of the public interface and , just as primary class, preference should be given to them before class (and category) protocols. // rdar://18013929 llvm-svn: 216610
* Objective-C. When multiple nullary selectors are found inFariborz Jahanian2014-08-271-0/+21
| | | | | | | | | | global pool in the course of method selection for a messaging expression, select one with the most general return type of 'id'. This is to remove type-mismatch warning (which is useless) as result of random selection of method with more restrictive return type. rdar://18095772 llvm-svn: 216560
* Fix representation of __attribute__((nonnull)) to support correctly modelingRichard Smith2014-08-271-15/+15
| | | | | | | | | | | | | | | the no-arguments case. Don't expand this to an __attribute__((nonnull(A, B, C))) attribute, since that does the wrong thing for function templates and varargs functions. In passing, fix a grammar error in the diagnostic, a crash if __attribute__((nonnull(N))) is applied to a varargs function, a bug where the same null argument could be diagnosed multiple times if there were multiple nonnull attributes referring to it, and a bug where nonnull attributes would not be accumulated correctly across redeclarations. llvm-svn: 216520
* revert patch r216469.Fariborz Jahanian2014-08-261-1/+1
| | | | llvm-svn: 216485
* c11- Check for c11 language option as documentation saysFariborz Jahanian2014-08-261-1/+1
| | | | | | | | feature is c11 about nested struct declarations must have struct-declarator-list. Without this change, code which was meant for c99 breaks. rdar://18125536 llvm-svn: 216469
* Objective-C. Allow [super initialize] in an +initializeFariborz Jahanian2014-08-251-1/+5
| | | | | | | implementation but not anywhere else. rdar://16628028 llvm-svn: 216408
* Objective-C. Warn when @encode'ing provides an incompleteFariborz Jahanian2014-08-221-0/+19
| | | | | | | | type encoding because in certain cases, such as for vector types, because we still haven't designed encoding for them. rdar://9255564 llvm-svn: 216301
* Objective-C. Update my previous patch to not warn ifFariborz Jahanian2014-08-221-1/+3
| | | | | | | +initialize is called on 'super' in its implementation. rdar://16628028 llvm-svn: 216282
* Objective-C. Warn if user has made explicit callFariborz Jahanian2014-08-221-0/+19
| | | | | | | to +initilize as this results in an extra call to this method. rdar://16628028 llvm-svn: 216271
* Objective-C. Recover from missing interface decl.Fariborz Jahanian2014-08-211-0/+27
| | | | | | | and checking on availability of method declaration instead of crashing. // rdar://18059669 llvm-svn: 216191
* Objective-C. Do not warn if user is using property-dox syntax to name aFariborz Jahanian2014-08-151-1/+1
| | | | | | | user provided setter name (as declared in @property attribute declaration). rdar://18022762 llvm-svn: 215736
* Objective-C. Handle case of multiple class methodsFariborz Jahanian2014-08-131-1/+8
| | | | | | found in global pool as well. rdar://16808765 llvm-svn: 215603
* Objective-C. This patch is to resolve the method used in methodFariborz Jahanian2014-08-132-4/+37
| | | | | | | expression to the best method found in global method pools. This is wip. // rdar://16808765 llvm-svn: 215577
* Sema: Handle declspecs without declarators in records properly in C modeDavid Majnemer2014-08-111-2/+2
| | | | | | | | | | | | | | | | | | | | | We had two bugs: - We wouldn't properly warn when a struct/union/enum was mentioned inside of a record definition if no declarator was provided. We should have mentioned that this declaration declares nothing. - We didn't properly support Microsoft's extension where certain declspecs without declarators would act as anonymous structs/unions. * We completely ignored the case where such a declspec could be a union. * We didn't properly handle the case where a record was defined inside another record: struct X { int a; struct Y { int b; }; }; llvm-svn: 215347
* Predefine IB_DESIGNABLE and IBInspectable macros. <rdar://problem/17441860>Bob Wilson2014-08-081-4/+2
| | | | | | | | | These macros are used as markers for Interface Builder and need to be defined to empty strings since they have no impact on the code. Patch by Ted Kremenek. llvm-svn: 215259
* Objective-C [qoi]. Issue warning and fixit if property-dot syntaxFariborz Jahanian2014-08-081-5/+6
| | | | | | | use mis-cased property name (which is currently accepted silently due to the way property setters are named). rdar://17911746 llvm-svn: 215250
* Objective-C ARC. Use of non-retain/autorelease APIFariborz Jahanian2014-08-082-3/+5
| | | | | | | for building Objective-C array literals in ARC mode. rdar://17554063 llvm-svn: 215232
* Objective-C arc. Switch the Objective-C dictionary literal in ARC modeFariborz Jahanian2014-08-072-2/+6
| | | | | | | to use non-retain/autorelease API variants of ObjC objects. wip. rdar://17554063 llvm-svn: 215146
* Objective-C ARC. More code for Objective-C'sFariborz Jahanian2014-08-062-1/+6
| | | | | | new APIs for literals. nfc. wip. rdar://17554063 llvm-svn: 215043
* Objective-C. Improve diagnostic when property isFariborz Jahanian2014-07-285-5/+5
| | | | | | | not auto synthesized in current implementation. rdar://17774815 llvm-svn: 214090
* Objective-C. Issue more warning diagnostic when certainFariborz Jahanian2014-07-266-17/+36
| | | | | | | | properties are not synthesized in property auto-synthesis, as it can potentiall lead to runtime errors. rdar://17774815 llvm-svn: 214032
* Objective-C. Warn if protocol used in an @protocolFariborz Jahanian2014-07-252-3/+18
| | | | | | | expression is a forward declaration as this results in undefined behavior. rdar://17768630 llvm-svn: 213968
* Objective-C. Patch to warn if the result of calling a property getter Fariborz Jahanian2014-07-184-8/+31
| | | | | | | | is unused (this is match behavior when property-dot syntax is used to use same getter). rdar://17514245 Patch by Anders Carlsson with minor refactoring by me. llvm-svn: 213423
* Objective-C. deprecated attribute is not inherited on methodsFariborz Jahanian2014-07-171-0/+35
| | | | | | | overriden in interfaces and protocols (this is already the case for properties). rdar://16068470 llvm-svn: 213282
* Objective-C. Changes per A. Ballman's commentFariborz Jahanian2014-07-161-0/+42
| | | | | | for my last patch. // rdar://17631257 llvm-svn: 213185
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-162-2/+0
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.NAKAMURA Takumi2014-07-162-0/+2
| | | | llvm-svn: 213148
* Continue parsing an expression list even after an error is encountered.Kaelyn Takata2014-07-141-1/+2
| | | | | | | | | Otherwise, multiple errors such as having unknown identifiers for two arguments won't be diagnosed properly (e.g. only the first one would have a diagnostic message if typo correction fails even though both would be diagnosed if typo correction suggests a replacement). llvm-svn: 213003
* Consolidate header inclusion diagnosticsAlp Toker2014-07-113-10/+10
| | | | | | | Make argument orders match, unify diagnostic IDs and reword the message to be a little less saccharine. llvm-svn: 212845
* Objective-C. When we use @selector(save:), etc. there may be more Fariborz Jahanian2014-06-241-0/+12
| | | | | | | | | | | | | than one method with mismatched type of same selector name. clang issues a warning to point this out since it may cause undefined behavior. There are cases though that some APIs don't care about user methods and such warnings are perceived as noise. This patch allows users to add paren delimiters around selector name to turn off such warnings. So, @selector((save:)) will turn off the warning. It also provides 'fixit' so user knows what to do. // rdar://16458579 llvm-svn: 211611
* Objective-C qoi. When Objective-C pointer mismatches withFariborz Jahanian2014-06-191-0/+17
| | | | | | | | a qualified-id type because pointer is object of a forward class declaration, include this info in a diagnostic note. // rdar://10751015 llvm-svn: 211324
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-181-1/+17
| | | | | | | | 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
* Objective-C. Revert my patch in r211234.Fariborz Jahanian2014-06-182-18/+4
| | | | llvm-svn: 211237
* Objective-C ARC. Allow conversion of (void*) pointers toFariborz Jahanian2014-06-182-4/+18
| | | | | | | retainable ObjC pointers without requiring a bridge-cast by recognizing this as a +0 context. // rdar://16627903 llvm-svn: 211234
* Objective-C. Check for integer overflow in Objective-C'sFariborz Jahanian2014-06-181-1/+19
| | | | | | boxed expression. // rdar://16417427 llvm-svn: 211215
* Objective-C. Try to fix the test in buildbot in my last patch.Fariborz Jahanian2014-06-181-1/+1
| | | | llvm-svn: 211197
* Objective-C. Attributes on class declarations carry overFariborz Jahanian2014-06-181-1/+28
| | | | | | | to forward class declarations for diagnosis. // rdar://16681279 llvm-svn: 211195
* Objective-C ARC. Do not warn about properties with bothFariborz Jahanian2014-06-171-2/+14
| | | | | | | | | IBOutlet and weak attributes when accessed being unpredictably set to nil because usage of such properties are always single threaded and its ivar cannot be set to nil asynchronously. // rdar://15885642 llvm-svn: 211132
* Objective-C. Diagnose when property access is using declaredFariborz Jahanian2014-06-161-0/+25
| | | | | | | property accessor methods which have become deprecated or available. // rdar://15951801 llvm-svn: 211039
* Objective-C ARC. Blocks that strongly capture themselvesFariborz Jahanian2014-06-121-2/+16
| | | | | | | | | | | to call themselves will get the warning: "Capturing <itself> strongly in this block is likely to lead to a retain cycle". Cut down on the amount of noise by noticing that user at some point sets the captured variable to null in order to release it (and break the cycle). // rdar://16944538 llvm-svn: 210823
* More tests for // rdar://17259812Fariborz Jahanian2014-06-121-0/+4
| | | | llvm-svn: 210798
* Objective-C. Accept '__attribute__((__ns_returns_retained__))' Fariborz Jahanian2014-06-111-0/+18
| | | | | | | for function/methods returning block in MRR mode as well. // rdar://17259812 llvm-svn: 210706
* Objective-C. More tests for both bridging attributes andFariborz Jahanian2014-06-111-4/+29
| | | | | | | a fix to make it work when CFStructs have no definition. // rdar://17238954. llvm-svn: 210690
* Objective-C. Patch to handle bridge attribute warningsFariborz Jahanian2014-06-111-0/+26
| | | | | | | | correctly when both NSAttributedString and NSMutableAttributedString are specified on the same CFStruct via different typedefs. // rdar://17238954 llvm-svn: 210660
OpenPOWER on IntegriCloud