Fariborz Jahanian
9b37b1d6bb
Allow conversion of qualified Class type to unqualified
...
Class type to match gcc's. Fixes radar 7789113.
llvm-svn: 99425
2010-03-24 21:00:27 +00:00
Fariborz Jahanian
c5b7bfc657
Improve diagnostics when ivar added to class
...
extension (radar 6812436).
llvm-svn: 99408
2010-03-24 18:08:23 +00:00
Ted Kremenek
5921b83f54
Improve diagnostic for @property/ivar type mismatch by including the types of the
...
ivar and @property respectively.
llvm-svn: 99312
2010-03-23 19:02:22 +00:00
Fariborz Jahanian
00c291b012
Set the relevent attributes declared in class extension
...
and fix a missing diagnostics on assigning to a read-only
property. Fixes radar 7766184.
llvm-svn: 99230
2010-03-22 23:25:52 +00:00
Fariborz Jahanian
cf711fb353
Diagnose miuse of property dot-syntax instead of crashing.
...
(radar 7634653).
llvm-svn: 99210
2010-03-22 21:02:34 +00:00
Fariborz Jahanian
a9effb55f3
Fixes access rues for ivars declared in class
...
implementations (radar 7547942).
llvm-svn: 99198
2010-03-22 19:04:14 +00:00
Rafael Espindola
568586ff22
Fix PR6618.
...
If a struct has an invalid field, mark it as invalid. Also avoid producing
errors about incomplete types that are invalid.
llvm-svn: 99150
2010-03-21 22:56:43 +00:00
Fariborz Jahanian
5140920a48
More coherent diagnostics when ivar is placed n categories.
...
(related to radar 7538989).
llvm-svn: 98993
2010-03-19 21:25:51 +00:00
Fariborz Jahanian
d5bb8cb348
Diagnose conversion of 'Class' to/from objective-c
...
object pointer types.
Fixes radar 7634850.
llvm-svn: 98970
2010-03-19 18:06:10 +00:00
Ted Kremenek
361ffd947c
Make PredefinedExpr::ComputeName() more robust to incorrect
...
code when we are printing the name of an Objective-C method
whose class has not been declared. Fixes <rdar://problem/7495713>.
llvm-svn: 98874
2010-03-18 21:23:08 +00:00
Fariborz Jahanian
8342e5776e
Some cleanup, change diagnostic when assigning to
...
a property which is not lvalue.
llvm-svn: 98848
2010-03-18 18:50:41 +00:00
Fariborz Jahanian
b8b0ea330c
objective-c patch to provide type safty when blocks are passing or
...
returning objc objects. There will be a corresponding objective-c++
patch soon.
llvm-svn: 98696
2010-03-17 00:20:01 +00:00
Ted Kremenek
e01bec9791
Add 'expected-note'
...
llvm-svn: 98560
2010-03-15 18:47:29 +00:00
Ted Kremenek
679708ee34
Correctly determine if the @property has been previously declared. If
...
a property has the same name as the ivar it wraps then the old logic
wouldn't find the previous property declaration.
llvm-svn: 98559
2010-03-15 18:47:25 +00:00
John McCall
c33dec3664
Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.
...
llvm-svn: 98541
2010-03-15 10:54:44 +00:00
Douglas Gregor
6cf3f3c75e
Statement expressions can be used in global- or namespace-scoped blocks
...
llvm-svn: 98135
2010-03-10 04:54:39 +00:00
Fariborz Jahanian
c4813e8d02
Don't error when a block pointer is passed to a
...
vararg functions/methods. Fixes radar 7725203.
llvm-svn: 98070
2010-03-09 18:34:52 +00:00
Ted Kremenek
a00c5db1a8
Augment __has_feature to report that Clang supports adding attribute 'unused'
...
to an Objective-C instance variable.
llvm-svn: 97850
2010-03-05 22:43:32 +00:00
Fariborz Jahanian
d2bccafe82
Patch to build qualifier on objective-c
...
pointer types. Fixes radar 7626768.
llvm-svn: 97847
2010-03-05 22:42:55 +00:00
Ted Kremenek
09597b461d
Fix crasher caused by setting a bit in a possibly empty bitvector while
...
doing printf format string checking. This is a recent regression.
llvm-svn: 97318
2010-02-27 08:34:51 +00:00
Fariborz Jahanian
8e3b9db27f
Forgot to include nested protocols in collection, resulting in
...
bogus warning. Fixes radar 7682116.
llvm-svn: 97157
2010-02-25 18:24:33 +00:00
Ted Kremenek
6bf658abef
Allow __attribute__((unused)) to be applied to ObjC ivars.
...
llvm-svn: 97103
2010-02-25 03:26:51 +00:00
Fariborz Jahanian
545643c309
More Sema check for ivars in class continuation.
...
llvm-svn: 97002
2010-02-23 23:41:11 +00:00
Ted Kremenek
514ff70d04
Fix another crash on invalid code. In this case, handle ObjC categories (with no names)
...
that refer to an undefined class.
llvm-svn: 96976
2010-02-23 19:39:46 +00:00
Fariborz Jahanian
404dc425bc
A test case for property synthesis using ivar in class extensions.
...
llvm-svn: 96968
2010-02-23 18:50:01 +00:00
Fariborz Jahanian
afe1386ed9
More support for ivars in class extension.
...
llvm-svn: 96850
2010-02-23 01:26:30 +00:00
Ted Kremenek
2fb89539f7
Clang really intends to reject attribute 'warn_unused_result' on Objective-C methods, but
...
instead it crashes on them. We might extend this attribute to work on methods, but for
now fix the crasher. Addresses <rdar://problem/7670939>.
llvm-svn: 96723
2010-02-21 05:15:32 +00:00
Fariborz Jahanian
34e3cef483
Start supporting declaration of ivars in @implementation
...
blocks. WIP.
llvm-svn: 96696
2010-02-19 20:58:54 +00:00
Fariborz Jahanian
c5d61df0a9
Issue extended diagnostic when property dot-syntax is used and
...
there is a setter but no getter (part of radar 7664555).
llvm-svn: 96687
2010-02-19 18:30:30 +00:00
Fariborz Jahanian
20912d644a
Allow for declaration and use of ivars in a stand-alone
...
implementation (toward radar 7547942).
llvm-svn: 96479
2010-02-17 17:00:07 +00:00
Fariborz Jahanian
30a42923d3
Class continuation now has its own property ast for
...
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar 7629420) and for future use.
llvm-svn: 96276
2010-02-15 21:55:26 +00:00
Fariborz Jahanian
dc68f9539c
Patch to fix a warning which exposed a bug in building
...
a qualified objective-c pointer type. Fixes radar 7638810.
(Also removes a FIXME).
llvm-svn: 96003
2010-02-12 19:27:33 +00:00
Fariborz Jahanian
13b9782cc0
Diagnose when user provided getter is being used as lvalue
...
using property dot-syntax. Fixes radar 7628953.
llvm-svn: 95838
2010-02-11 01:11:34 +00:00
Fariborz Jahanian
113b8ad7cf
Reverse a partial fix patch for radar 7214820. It broke some code and
...
I don't have time to refix it for now.
llvm-svn: 95733
2010-02-10 00:32:12 +00:00
Fariborz Jahanian
5db5281db8
Finish implementing property synthesis by default.
...
(radar 7381956).
llvm-svn: 95695
2010-02-09 21:49:50 +00:00
Fariborz Jahanian
04477f3de9
Merge block/function pointer types with objc's __weak
...
attribute properly and avoid bogus warning. This is
an objective-c fix only. objective-c++ follows different code
pass and requires separate fix (which will come at a later time).
Fixes radar 7214820.
llvm-svn: 95571
2010-02-08 21:09:39 +00:00
Ted Kremenek
2f2692f8ca
Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.
...
llvm-svn: 95348
2010-02-05 02:06:54 +00:00
Anders Carlsson
8345a07c25
Fix test.
...
llvm-svn: 95108
2010-02-02 19:09:34 +00:00
Ted Kremenek
b0fe9b9a40
Add test case for <rdar://problem/7068334> (which was fixed by r94864).
...
llvm-svn: 94865
2010-01-30 00:56:00 +00:00
Ted Kremenek
8d9842d43f
Switch Sema over to using the new implementation of format string
...
checking. It passes all existing tests, and the diagnostics have been
refined to provide better range information (we now highlight
individual format specifiers) and more precise wording in the
diagnostics.
llvm-svn: 94837
2010-01-29 20:55:36 +00:00
Mike Stump
0978af83b3
Insulate these from changes to the default for -Wunreachable-code.
...
llvm-svn: 94326
2010-01-23 20:12:18 +00:00
Fariborz Jahanian
935f041243
outside a method, 'super' should resolve in a normal name look up
...
to mimic gcc's behavior. Fixes radar 7400691.
llvm-svn: 94246
2010-01-22 23:04:44 +00:00
Fariborz Jahanian
4f8a57112f
Settled rule on warning on unimplemented property in
...
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).
llvm-svn: 94014
2010-01-20 19:36:21 +00:00
Fariborz Jahanian
98609b3a07
Patch to implement required warnings for unimplemented
...
properties imported frfom protocol. Fixes radar 7544809.
llvm-svn: 93965
2010-01-20 01:51:55 +00:00
Fariborz Jahanian
6d77a96111
objective-c test case for __attribute__((unused)) on method arguments.
...
llvm-svn: 93887
2010-01-19 18:39:17 +00:00
Fariborz Jahanian
c1d2fa5d48
Issue diagnostics (instead of crashing in code gen) when using
...
property dot-syntax notation to use setter/getters in objective-c.
Fixes radar 7553050.
llvm-svn: 93883
2010-01-19 17:48:02 +00:00
Fariborz Jahanian
6fada5be91
When in objective-c methods, do the built-in name lookup after
...
ivar name lookup. Fixes pr5986.
llvm-svn: 93271
2010-01-12 23:58:59 +00:00
Chris Lattner
f9895c48fd
add a bunch of missing prototypes to tests
...
llvm-svn: 93072
2010-01-09 20:43:19 +00:00
Douglas Gregor
6da83624e4
Whenever we emit a typo-correction diagnostic, also emit a note
...
pointing to the declaration that we found that has that name (if it is
unique).
llvm-svn: 92877
2010-01-07 00:17:44 +00:00
Douglas Gregor
10f1e4dda8
When suggesting a typo correction for an @implementation without a
...
corresponding @interface, provide a note showing which interface we're
referring to. This note has the fix-it hint on it.
Also, don't automatically apply fix-it hints for notes. They're meant
to express fix-its that would change semantics.
llvm-svn: 92870
2010-01-06 23:44:25 +00:00