summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX/objc-pointer-conv.mm
Commit message (Collapse)AuthorAgeFilesLines
* Added a new attribute, objc_root_class, which informs the compiler when a ↵Patrick Beard2012-04-061-1/+1
| | | | | | | | | 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
* Fix an objc++ diagnostic initializing objc pointers.Fariborz Jahanian2011-03-211-1/+1
| | | | | | // rdar:// 9139947 llvm-svn: 128013
* When we're performing an explicit cast of some sort, don't complainDouglas Gregor2010-12-021-1/+3
| | | | | | | | | about deprecated Objective-C pointer conversions. Plus, make sure to actually set an appropriate AssignmentAction when performing an implicit conversion from an InitializationSequence. Fixes regressions in the GCC DejaGNU testsuite. llvm-svn: 120744
* Improve our handling of cv-qualifiers in Objective-C pointerDouglas Gregor2010-12-011-2/+2
| | | | | | | | | | | | | | | conversions. Previously, we would end up collapsing qualification conversions into the Objective-C pointer conversion step, including (possibly) stripping qualifiers that shouldn't be removed. This generalizes BuildSimilarlyQualifiedPointerType() to also work on Objective-C object pointers, then eliminates the (redundant, not totally correct) BuildSimilarlyQualifiedObjCObjectPointerType() function. Fixes <rdar://problem/8714395>. llvm-svn: 120607
* "const id<NSFoo> *" instead of "id<NSFoo> const *".Chris Lattner2010-09-051-2/+2
| | | | | | I think this wraps up all the legal cases. llvm-svn: 113096
* Extend the "cannot convert from base class pointer to derived classDouglas Gregor2010-07-011-1/+1
| | | | | | pointer" diagnostic to handle references, too. llvm-svn: 107372
* Improve diagnostic when we fail to pick an overload because it wouldDouglas Gregor2010-06-301-0/+8
| | | | | | require a base-to-derived pointer conversion. llvm-svn: 107349
* Whenever we complain about a failed initialization of a function orDouglas Gregor2010-04-221-1/+1
| | | | | | | | | | | | | | | | | 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
* Switch the initialization of Objective-C message parameters (as occursDouglas Gregor2010-04-211-1/+1
| | | | | | | | | during message sends) over to the new initialization code and away from the C-only CheckSingleAssignmentConstraints. The enables the use of C++ types in method parameters and message arguments, as well as unifying more initialiation code overall. llvm-svn: 102035
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. llvm-svn: 100832
* objective-c++ must take into account qualifiers when Fariborz Jahanian2010-03-151-0/+12
| | | | | | considering valid objc pointer converions. llvm-svn: 98557
* Allow pointer convesion of an objective-c pointer toFariborz Jahanian2009-12-161-0/+26
'void *' to mimic gcc's behavior. (fixes radar 7477351). llvm-svn: 91570
OpenPOWER on IntegriCloud