summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
Commit message (Collapse)AuthorAgeFilesLines
...
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-052-2/+2
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* when emitting an error about a missing } in a compound statement, emitChris Lattner2010-09-012-6/+8
| | | | | | a "to match this {" note, pointing out the opener. llvm-svn: 112709
* Fix typo in error message and testcase.Eric Christopher2010-08-251-5/+5
| | | | llvm-svn: 112115
* No need to default synthesize property if implementation Fariborz Jahanian2010-08-251-0/+28
| | | | | | | has its own getter and setter methods declared. Fixed 8349319 (nonfragile-abi2). llvm-svn: 112003
* Fix a bug in nonfragile-abi2 when attempting to diagnoseFariborz Jahanian2010-08-241-0/+36
| | | | | | | | previous use of a synthesized 'ivar' with property of same name declared as @dynamic. In this case, 'ivar' is in the inherited class and no diagnostics should be issued. llvm-svn: 111940
* Diagnose if type of iboutletcollection attribute is a builtin type.Fariborz Jahanian2010-08-171-0/+1
| | | | llvm-svn: 111324
* Diagnose use of iboutletcollection on ivar/propertyFariborz Jahanian2010-08-171-1/+4
| | | | | | of non-object types. Radar 8308053. llvm-svn: 111296
* Patch to add type parameter support for attribute iboutletcollection.Fariborz Jahanian2010-08-171-0/+26
| | | | | | Radar 8308053. llvm-svn: 111275
* Diagnose assiging to an interface object inFariborz Jahanian2010-08-161-2/+1
| | | | | | | non-fragile abi mode as sizes are not statically known. Fixes radar 8315734. llvm-svn: 111191
* When issuing warning for future conflict resolution,Fariborz Jahanian2010-08-131-2/+2
| | | | | | | | (nonfragile-abi2), do not consider 'ivar' access in class methods. Also, improve on diagnostics. Radar 8304561. llvm-svn: 111023
* Fixes block type matching bug. Radar 8302845.Fariborz Jahanian2010-08-122-2/+19
| | | | llvm-svn: 110950
* Downgrade error about nonnull attribute bbeing applied to a function ↵Douglas Gregor2010-08-121-0/+2
| | | | | | without point arguments to a warning llvm-svn: 110939
* Change text of diagnostics on user request.Fariborz Jahanian2010-08-111-3/+3
| | | | | | radar 7948654. llvm-svn: 110857
* IRGen support for functions returning objc objectFariborz Jahanian2010-08-111-0/+1
| | | | | | types. Fixes PR7865. llvm-svn: 110832
* Fix a spurious warning when message sent to qualified-idFariborz Jahanian2010-08-101-0/+5
| | | | | | type receiver (pr7861). llvm-svn: 110696
* Implements gcc's -Wstrict-selector-match.Fariborz Jahanian2010-08-091-0/+75
| | | | | | (radar 8127244). llvm-svn: 110622
* Warn if class object does not implement qualifiedFariborz Jahanian2010-08-091-2/+2
| | | | | | id's protocols. Fixes radar 8154220. llvm-svn: 110583
* Fix an Objective-C crasher, PR7839.Douglas Gregor2010-08-071-0/+4
| | | | llvm-svn: 110515
* Tighten the rules when deciding if an ivar must beFariborz Jahanian2010-07-301-0/+5
| | | | | | | auto-synthesized (nonfragile-abi2 specific). Fixes radar 8251648. llvm-svn: 109866
* Don't print out ivars twice in Decl::print(). Fixes <rdar://problem/8253668>.Ted Kremenek2010-07-301-3/+15
| | | | llvm-svn: 109833
* Tigthen the condition for issung ivar shadowingFariborz Jahanian2010-07-291-0/+21
| | | | | | | variables to those in file scope (nonfragile-abi2). Fixes radar 8248681. llvm-svn: 109758
* Warn when property ivar lookup finds a global variableFariborz Jahanian2010-07-221-0/+13
| | | | | | | of same name. In nonfragile-abi2, lookup accesses a synthesized ivar. This is a transition warning. Radar 8225011. llvm-svn: 109197
* Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's ↵Ted Kremenek2010-07-211-3/+3
| | | | | | | | | | | | behavior. Note that GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now Clang's behavior is more strict in this case, but more consistent. We will need to see how much this fires on real code and determine whether this case should be downgraded to a warning. Fixes <rdar://problem/8213093>. llvm-svn: 109033
* Patch to type match comparing Objective-C Classes which implement Fariborz Jahanian2010-07-191-0/+30
| | | | | | protocols (Radar 8191774). llvm-svn: 108758
* Categories cannot synthesize property ivars,Fariborz Jahanian2010-07-191-0/+5
| | | | | | and a minor cleanup. llvm-svn: 108707
* Another test case for on demand synthesis of ivars.Fariborz Jahanian2010-07-171-0/+88
| | | | llvm-svn: 108600
* Patch to synthesize property ivars on demand asFariborz Jahanian2010-07-171-0/+40
| | | | | | | part of the new property synthesis by default. wip. llvm-svn: 108599
* Don't error when doing default property synthesis Fariborz Jahanian2010-07-141-0/+12
| | | | | | and some are already synthesized by user declaration. llvm-svn: 108341
* Consider obective-c pointer arguments as valid sentinel argsFariborz Jahanian2010-07-141-0/+12
| | | | | | as well. Fixes radar 7975788. llvm-svn: 108333
* Check on property attributes which are declaredFariborz Jahanian2010-07-131-0/+6
| | | | | | in class extensions (radar 8171968). llvm-svn: 108283
* Add test case for <rdar://problem/4289832>. Clang actuallys getsTed Kremenek2010-06-291-0/+19
| | | | | | | | the test case right (for the noreturn warning) because the CFG doesn't support @try yet, but the test case is now present when we do properly implement CFG support for @try...@catch. llvm-svn: 107203
* This patch fixes a bug whereby, clang skipped Fariborz Jahanian2010-06-291-0/+16
| | | | | | | | | unimplemented property warning for properties coming from class's conformin protocol. It also simplifies the algorithm in the process. Fixes radar 8035776. llvm-svn: 107174
* Patch to provide separate ASTs for multiple ObjC class extension Fariborz Jahanian2010-06-221-3/+11
| | | | | | declarations (implements radar 7928731). llvm-svn: 106597
* Extend format string type-checking to include '%p'. Fixes remaining cases ↵Ted Kremenek2010-06-161-0/+8
| | | | | | PR 4468. llvm-svn: 106151
* Clang missing warning about conflicting declaration vs. definition Fariborz Jahanian2010-05-211-0/+11
| | | | | | for variable arguments list methods. (radar 8006060). llvm-svn: 104407
* Misc. fixes to bring Objetive-C++'s handling ofFariborz Jahanian2010-05-181-2/+3
| | | | | | | gc attributes to be inline with Objective-C (for radar 7925141). llvm-svn: 104084
* These test now run in objective-c++ mode we well.Fariborz Jahanian2010-05-184-0/+4
| | | | llvm-svn: 104041
* Diagnose unused exception parameters under a different warning groupDouglas Gregor2010-05-032-2/+6
| | | | | | | | (-Wunused-exception-parameter) than normal variables, since it's more common to name and then ignore an exception parameter. This warning is neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>. llvm-svn: 102931
* Complain when we try to initialize an object of Objective-C class typeDouglas Gregor2010-05-031-0/+7
| | | | | | | | (which is ill-formed) with an initializer list. Also, change the fallback from an assertion to a generic error message, which is far friendlier. Fixes <rdar://problem/7730948>. llvm-svn: 102930
* Do not issue warning on unimplemented property in the class, if itFariborz Jahanian2010-05-032-2/+49
| | | | | | | | conforms to a protocol as one of its super classes does. This is because conforming super class will implement the property. This implements new warning rules for unimplemented properties (radar 7884086). llvm-svn: 102919
* Properties cannot be synthesized by-dafult inFariborz Jahanian2010-04-291-0/+10
| | | | | | | categories. Issue usual warnings instead of confusing error message. Radar 7920807 llvm-svn: 102645
* wordsmith an objc warning, rdar://7900756Chris Lattner2010-04-261-1/+1
| | | | llvm-svn: 102388
* Refactor Objective-C @catch parameter checking by detangling it fromDouglas Gregor2010-04-261-0/+4
| | | | | | | | function-parameter checking and splitting it into the normal ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch parameter rather than the ill-fitting ParmVarDecl. llvm-svn: 102347
* Improve on my previous diagnostics: per Doug's comment.Fariborz Jahanian2010-04-231-3/+3
| | | | llvm-svn: 102190
* Trying to improve on a diagnostics for properties.Fariborz Jahanian2010-04-231-3/+3
| | | | llvm-svn: 102187
* Change the 'declared at' diagnostic to say 'declared here'.Anders Carlsson2010-04-231-3/+3
| | | | llvm-svn: 102163
* Whenever we complain about a failed initialization of a function orDouglas Gregor2010-04-2212-18/+19
| | | | | | | | | | | | | | | | | method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ llvm-svn: 102038
* Rework the Parser-Sema interaction for Objective-C messageDouglas Gregor2010-04-212-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sends. Major changes include: - Expanded the interface from two actions (ActOnInstanceMessage, ActOnClassMessage), where ActOnClassMessage also handled sends to "super" by checking whether the identifier was "super", to three actions (ActOnInstanceMessage, ActOnClassMessage, ActOnSuperMessage). Code completion has the same changes. - The parser now resolves the type to which we are sending a class message, so ActOnClassMessage now accepts a TypeTy* (rather than an IdentifierInfo *). This opens the door to more interesting types (for Objective-C++ support). - Split ActOnInstanceMessage and ActOnClassMessage into parser action functions (with their original names) and semantic functions (BuildInstanceMessage and BuildClassMessage, respectively). At present, this split is onyl used by ActOnSuperMessage, which decides which kind of super message it has and forwards to the appropriate Build*Message. In the future, Build*Message will be used by template instantiation. - Use getObjCMessageKind() within the disambiguation of Objective-C message sends vs. array designators. Two notes about substandard bits in this patch: - There is some redundancy in the code in ParseObjCMessageExpr and ParseInitializerWithPotentialDesignator; this will be addressed shortly by centralizing the mapping from identifiers to type names for the message receiver. - There is some #if 0'd code that won't likely ever be used---it handles the use of 'super' in methods whose class does not have a superclass---but could be used to model GCC's behavior more closely. This code will die in my next check-in, but I want it in Subversion. llvm-svn: 102021
* Improve on source location of diagnostic when defaultFariborz Jahanian2010-04-211-0/+14
| | | | | | property synthesis is using a super class ivar. llvm-svn: 102011
* Fix crash on invalid code where a @throw statement is not followed by a ';'Ted Kremenek2010-04-201-0/+7
| | | | llvm-svn: 101941
OpenPOWER on IntegriCloud