summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Objective-C. Don't ignore availability attribute whenFariborz Jahanian2014-06-101-0/+18
| | | | | | | doing Objective-C subscript access. // rdar://16842487 PR19682. llvm-svn: 210565
* Objective-C. Consider block pointer as NSObject as well as conforming toFariborz Jahanian2014-06-091-0/+21
| | | | | | | 'NSCopying' protocol when diagnosing block to ObjC pointer conversion. // rdar://16739120 llvm-svn: 210491
* Objective-C. Diagnose assigning a block pointer type toFariborz Jahanian2014-05-301-0/+22
| | | | | | | an Objective-C object type other than 'id'. // rdar://16739120 llvm-svn: 209906
* Objective-C. Diagnose use of properties in functions nested in, Fariborz Jahanian2014-05-281-1/+13
| | | | | | | now deprecated, ObjC containers instead of crashing. // rdar://16859666 llvm-svn: 209758
* Objective-C. Deprecate use of function definitionsFariborz Jahanian2014-05-281-0/+25
| | | | | | | in Objective-C container declarations (but not in their definitions. // rdar://10414277 llvm-svn: 209751
* Objective-C. Fixes an obscuer crash caused by multiple inclusion ofFariborz Jahanian2014-05-271-1/+27
| | | | | | | same framework after complaining about duplicate class definition. // rdar://17024681 llvm-svn: 209672
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-092-2/+30
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* ThreadSafetyAnalysis: Don't crash when trying to analyze objc methods.Benjamin Kramer2014-05-091-0/+19
| | | | | | | | | | | The thread safety analysis isn't very useful in ObjC (you can't annotate ObjC classes or methods) but we can still analyze the actual code and show violations in usage of C/C++ functions. Fixes PR19541, which does not use thread safety attributes but crashes with -Weverything. llvm-svn: 208436
* Rename "secondary initializer" -> "convenience initializer" in the warnings, ↵Argyrios Kyrtzidis2014-05-061-7/+7
| | | | | | which is a more correct and consistent term. llvm-svn: 208142
* Objective-C. Improve diagnosis of bridging types.Fariborz Jahanian2014-04-292-39/+130
| | | | | | // rdar://16737117 llvm-svn: 207542
* [SemaObjC] Fix ObjCInterfaceDecl::inheritsDesignatedInitializers(), if there ↵Argyrios Kyrtzidis2014-04-261-0/+22
| | | | | | | | | | are no designated initializers in the super class hierarchy then it should return false. rdar://16692535 llvm-svn: 207332
* Objective-C [IRGen]. Fixes a crash in IRGen involving use ofFariborz Jahanian2014-04-231-0/+26
| | | | | | | 'typeof' to extract type of an @encode expression used in an initializer. // rdar://16655340 llvm-svn: 207004
* Objective-C ARC. Under ARC, addition of 'bridge' attributeFariborz Jahanian2014-04-221-3/+3
| | | | | | | | on CF type is not sufficient and bridge casting is still required for proper ownership semantics. // rdar://16650445 llvm-svn: 206910
* Objective-C. Patch to allow use of dot syntax on classFariborz Jahanian2014-04-211-0/+43
| | | | | | | objects to fund root class's instance methods. // rdar://16650575 llvm-svn: 206781
* Move ObjC Cocoa.h header test to HeadersAlp Toker2014-04-191-5/+0
| | | | | | | This tests for broad compatibility with platform SDK headers using the clang driver and so belongs alongside the other header ingtegration tests. llvm-svn: 206687
* [objc] -[NSObject init] is documented to not do anything, don't warn if ↵Argyrios Kyrtzidis2014-04-161-1/+21
| | | | | | | | subclasses do not call [super init] on their initializers. Part of rdar://16568441 llvm-svn: 206410
* [objc] Consider new initializers inside @implementation when determining if ↵Argyrios Kyrtzidis2014-04-161-7/+84
| | | | | | | | | | the class introduces new initializers. Part of rdar://16568441 llvm-svn: 206409
* Objective-C arc [Sema]. Allow bridge cast of a qualified-id expressionFariborz Jahanian2014-04-042-26/+26
| | | | | | | when bridged Objective-C type conforms to the protocols in CF types's Objective-C class. // rdar://16393330 llvm-svn: 205659
* Implement the 'optnone' attribute, which suppresses most optimizationsPaul Robinson2014-03-311-0/+1
| | | | | | on a function. llvm-svn: 205255
* ARM64: initial clang support commit.Tim Northover2014-03-292-0/+47
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* [-Wunreachable-code] Expand paren-suppression heuristic to C++/ObjC bools.Ted Kremenek2014-03-291-0/+33
| | | | llvm-svn: 205074
* Objective-C. Make -Wselector-type-mismatch off byFariborz Jahanian2014-03-281-1/+1
| | | | | | | default until we provide a work-around for warning suppression. llvm-svn: 205066
* [SemaObjC] For the semantics of the designated-initializer attribute, ↵Argyrios Kyrtzidis2014-03-281-3/+9
| | | | | | | | | | consider that the ObjC interface of the class includes its class extensions. This is follow-up for rdar://16305347 llvm-svn: 205065
* Objective-C. revert r204965. This will makeFariborz Jahanian2014-03-281-1/+1
| | | | | | | | | | | -Wselector-type-mismatch default again. After internal discussions, we think that in most cases it has helped our developers find hard to detect undefined behaviors. We are going to provide a syntax (and fix-it) to suppress the warning in remaining of false positive cases. llvm-svn: 205024
* Objective-C. Make multiple selector warningFariborz Jahanian2014-03-271-1/+1
| | | | | | | an opt-in option under -Wselector-type-mismatch. // rdar://16445728 llvm-svn: 204965
* Objective-C. Fixes a bogus warning on unimplementedFariborz Jahanian2014-03-261-0/+24
| | | | | | | | selectors because we were not going through entire elements in list of all implemented selectors. // rdar://16428638 llvm-svn: 204852
* [-Wunreachable-code] add a specialized diagnostic for unreachable increment ↵Ted Kremenek2014-03-211-0/+9
| | | | | | expressions of loops. llvm-svn: 204430
* Objective-C. No need to issue deprecated warning if deprecated method Fariborz Jahanian2014-03-181-2/+14
| | | | | | | | in class extension is being implemented in primary class implementation (no overriding is involved). // rdar://16249335 llvm-svn: 204093
* Objective-C. Consider blocks for designated initializerFariborz Jahanian2014-03-171-3/+26
| | | | | | | | warnings (warning or lack there of) as well since blocks are another pattern for envoking other designated initializers. // rdar://16323233 llvm-svn: 204081
* Objective-C. Do not warn when an instance method andFariborz Jahanian2014-03-171-0/+13
| | | | | | | | class method with the same selctor but different argument types having one of them in class extension. // rdar://16312105 llvm-svn: 204065
* Start breaking -Wunreachable-code up into different diagnostic groups.Ted Kremenek2014-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent work on -Wunreachable-code has focused on suppressing uninteresting unreachable code that center around "configuration values", but there are still some set of cases that are sometimes interesting or uninteresting depending on the codebase. For example, a dead "break" statement may not be interesting for a particular codebase, potentially because it is auto-generated or simply because code is written defensively. To address these workflow differences, -Wunreachable-code is now broken into several diagnostic groups: -Wunreachable-code: intended to be a reasonable "default" for most users. and then other groups that turn on more aggressive checking: -Wunreachable-code-break: warn about dead break statements -Wunreachable-code-trivial-return: warn about dead return statements that return "trivial" values (e.g., return 0). Other return statements that return non-trivial values are still reported under -Wunreachable-code (this is an area subject to more refinement). -Wunreachable-code-aggressive: supergroup that enables all these groups. The goal is to eventually make -Wunreachable-code good enough to either be in -Wall or on-by-default, thus finessing these warnings into different groups helps achieve maximum signal for more users. TODO: the tests need to be updated to reflect this extra control via diagnostic flags. llvm-svn: 203994
* Objective-C. Turn off designated initialization warnings onFariborz Jahanian2014-03-141-1/+15
| | | | | | | | 'init' methods which are unavailable. Subclasses of NSObject have to implement such methods as a common pattern to prevent user's own implementation. // rdar://16305460 llvm-svn: 203966
* Objective-C. Allow objc_designated_initializer for private Fariborz Jahanian2014-03-141-8/+8
| | | | | | | initializers; but only those declared in class extensions (not in implementations). // rdar://16305347 llvm-svn: 203954
* Objective-C. Issue diagnostics on mismatched methods when their selector is usedFariborz Jahanian2014-03-121-4/+26
| | | | | | in an @selector expression. // rdar://15794055 llvm-svn: 203693
* Objective-C. Prevent an assertion crash due to buggy codeFariborz Jahanian2014-03-111-0/+10
| | | | | | as it can commonly happen. // rdar://16261494 llvm-svn: 203598
* Remove trailing whitespace introduced in r203028.Bob Wilson2014-03-111-4/+4
| | | | llvm-svn: 203588
* Objective-C. Diagose use of undefined protocolsFariborz Jahanian2014-03-113-3/+16
| | | | | | | when a class adopts a protocol that inherits from undefined protocols. // rdar://16111182 llvm-svn: 203586
* [-Wunreachable-code] Handle Objective-C bool literals in 'isConfigurationValue'.Ted Kremenek2014-03-091-0/+25
| | | | | | | This includes special casing 'YES' and 'NO', which are constants defined as macros. llvm-svn: 203380
* Objective-C. Suppress the warning for auto synthesis of property notFariborz Jahanian2014-03-051-0/+32
| | | | | | | synthesizing protocol properties if class's super class implements them. // rdar://16089191 llvm-svn: 203028
* Fix recursion bug in logic to validate ↵Ted Kremenek2014-03-051-3/+2
| | | | | | 'objc_protocol_requires_explicit_implementation' conformance. llvm-svn: 203024
OpenPOWER on IntegriCloud