Fariborz Jahanian
8e0079c787
Change condition under which 'retain'/'copy' are directly evaluated.
...
llvm-svn: 60729
2008-12-08 23:56:17 +00:00
Ted Kremenek
8f7afdd21e
Add checking for zero-sized VLAs.
...
llvm-svn: 60726
2008-12-08 22:47:34 +00:00
Ted Kremenek
223005f35a
Incorporate MissingDealloc_IBOutlet.m test case into MissingDealloc.m
...
llvm-svn: 60722
2008-12-08 22:05:43 +00:00
Ted Kremenek
1f9dd45f57
Incorporate MissingDeallc_SEL.m test case into MissingDealloc.m
...
llvm-svn: 60721
2008-12-08 22:01:50 +00:00
Ted Kremenek
8f5c0ede0f
Add test case for <rdar://problem/6380411>.
...
llvm-svn: 60720
2008-12-08 21:59:21 +00:00
Chris Lattner
46415261ee
Fix PR3172: if we see an eof or } at the top level, reject it.
...
This is important because ParseDeclarationOrFunctionDefinition
skips to, but does not consume, an } on error.
llvm-svn: 60719
2008-12-08 21:59:01 +00:00
Chris Lattner
3a90716f6a
improve comment.
...
llvm-svn: 60718
2008-12-08 21:53:24 +00:00
Ted Kremenek
96d2eecf85
'self.myIvar = nil' (properties) only releases myIvar when the property has kind 'assign'. This fixes <rdar://problem/6380411>.
...
llvm-svn: 60717
2008-12-08 21:44:15 +00:00
Steve Naroff
5fd31b17df
ObjCInterfaceDecl::lookupInstanceMethod() needs to look through a categories protocols.
...
Fixes <rdar://problem/6418640> clang on prokit: error: incompatible type returning 'id', expected 'NSSize'
llvm-svn: 60716
2008-12-08 20:57:28 +00:00
Steve Naroff
f1ab600362
Fix a couple uninitialized variables from my previous commit.
...
llvm-svn: 60713
2008-12-08 20:01:41 +00:00
Dan Gohman
16873c6284
Remove the #include of ScheduleDAGSDNodes.h, which is no longer necessary.
...
llvm-svn: 60712
2008-12-08 19:45:33 +00:00
Fariborz Jahanian
3edadfc730
Changed 'readonly' 'retain/copy' diagnostics into
...
warning as it is allowed in gcc and will break projects.
llvm-svn: 60710
2008-12-08 19:28:10 +00:00
Fariborz Jahanian
3685995d2c
Since we do not allow a readonly property to be 'copy'retain', we
...
must allow the continuation class to extend it to a 'readwrite'
and 'copy/retain'.
llvm-svn: 60709
2008-12-08 18:47:29 +00:00
Douglas Gregor
5daeee2bd6
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs
...
llvm-svn: 60708
2008-12-08 18:40:42 +00:00
Steve Naroff
f122ff0cad
Fix <rdar://problem/6423452> clang ObjC rewriter: Don't use __declspec(dllimport) for Blocks functions, as they are linked statically.
...
llvm-svn: 60704
2008-12-08 17:30:33 +00:00
Steve Naroff
1042ff345a
Handle chained/nested property 'getters' (obj.p1.p2.p3).
...
This is a follow-up to fixing <rdar://problem/6213955> clang ObjC rewriter: rewriter doesn't appear to support @property and @synthesize.
llvm-svn: 60700
2008-12-08 16:43:47 +00:00
Sebastian Redl
82639aff7b
Fill in some parts of cxx_status.html
...
llvm-svn: 60699
2008-12-08 16:24:08 +00:00
Zhongxing Xu
17a37ebf32
fix 80-col violation.
...
llvm-svn: 60693
2008-12-08 07:14:51 +00:00
Zhongxing Xu
8df5083bb4
fix typo.
...
llvm-svn: 60686
2008-12-08 05:12:38 +00:00
Eli Friedman
14fb8587be
Workaround for PR3173. The fix is correct in the sense that if the enum
...
code were working correctly, it would be a no-op, but it's not really a
proper fix. That said, I don't really want to touch the enum code at
the moment because I don't understand it very well, and this seems to
be a relatively visible regression.
llvm-svn: 60680
2008-12-08 02:21:03 +00:00
Sebastian Redl
66f6fa1b2b
Fix outdated comment. Checks so much more than just typedefs in C++.
...
llvm-svn: 60676
2008-12-07 20:13:57 +00:00
Nuno Lopes
cbab7f6b29
add missing gentoo c++ include paths
...
llvm-svn: 60655
2008-12-07 12:11:37 +00:00
Chris Lattner
b3582b939e
a minor grammar fix
...
llvm-svn: 60646
2008-12-07 00:59:53 +00:00
Anders Carlsson
a1a9c28d30
Pass the VLA size expr range to the VLA diags
...
llvm-svn: 60645
2008-12-07 00:49:48 +00:00
Anders Carlsson
0d8f0ba6ed
Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.
...
llvm-svn: 60638
2008-12-07 00:20:55 +00:00
Fariborz Jahanian
06d0dd641b
Setters returning a typedef of 'void' should not cause error.
...
Bug reported by Chris L.
llvm-svn: 60635
2008-12-06 23:12:49 +00:00
Fariborz Jahanian
d2c2ad515e
Use of properties declared in protocols in the category
...
via the category's protocol list1s, with appropriate
diagnsostics and a test case.
llvm-svn: 60634
2008-12-06 23:03:39 +00:00
Anders Carlsson
3bb1ffca94
Simplify test.
...
llvm-svn: 60631
2008-12-06 22:27:22 +00:00
Fariborz Jahanian
ff83998e31
Improve error reporting of property and setter/getter
...
type mimatches.
llvm-svn: 60630
2008-12-06 21:48:16 +00:00
Fariborz Jahanian
8707e322cc
Check for correct'void' return type for setter methods.
...
llvm-svn: 60629
2008-12-06 21:11:37 +00:00
Anders Carlsson
5df391e5c7
Add diagnostics for bitfields.
...
llvm-svn: 60628
2008-12-06 20:33:04 +00:00
Anders Carlsson
45f4b8c0f2
Fix invalid bit-field.
...
llvm-svn: 60627
2008-12-06 20:32:39 +00:00
Anders Carlsson
233a60d03e
Simplify some diagnostics.
...
llvm-svn: 60626
2008-12-06 20:05:35 +00:00
Fariborz Jahanian
62293f4d97
Changed a 'FIXME' into new comment. Added a test case
...
testing declaration of properties in categories.
llvm-svn: 60625
2008-12-06 19:59:02 +00:00
Ted Kremenek
69d78b9d98
Add bandaid transfer function support for assignments involving ObjCKVCRefExpr.
...
llvm-svn: 60622
2008-12-06 02:39:30 +00:00
Fariborz Jahanian
5a3422f602
Patch to diagnose a variety of misuse of property
...
attributes. Example would be, readonly, assign or
assign, copy, etc.
llvm-svn: 60620
2008-12-06 01:12:43 +00:00
Douglas Gregor
b0846b0f51
Add support for calls to dependent names within templates, e.g.,
...
template<typename T> void f(T x) {
g(x); // g is a dependent name, so don't even bother to look it up
g(); // error: g is not a dependent name
}
Note that when we see "g(", we build a CXXDependentNameExpr. However,
if none of the call arguments are type-dependent, we will force the
resolution of the name "g" and replace the CXXDependentNameExpr with
its result.
GCC actually produces a nice error message when you make this
mistake, and even offers to compile your code with -fpermissive. I'll
do the former next, but I don't plan to do the latter.
llvm-svn: 60618
2008-12-06 00:22:45 +00:00
Douglas Gregor
4619e439b6
Introduce basic support for dependent types, type-dependent
...
expressions, and value-dependent expressions. This permits us to parse
some template definitions.
This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.
llvm-svn: 60615
2008-12-05 23:32:09 +00:00
Fariborz Jahanian
9c196795e6
Fixed a comment.
...
llvm-svn: 60611
2008-12-05 22:36:19 +00:00
Fariborz Jahanian
fbbaf6afae
This test checks for duplicate implementation of the same
...
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).
llvm-svn: 60610
2008-12-05 22:32:48 +00:00
Fariborz Jahanian
88909849bb
Fixed a test case. Added a test case showing property setter's
...
type mismatch (related to my last patch).
llvm-svn: 60599
2008-12-05 18:38:31 +00:00
Fariborz Jahanian
7988d7dc3e
(instance/class) Method type checking between class and its implementation.
...
(instance/class) Method type checking between category and its implementation.
And a test case for all.
llvm-svn: 60598
2008-12-05 18:18:52 +00:00
Douglas Gregor
5101c24f60
Representation of template type parameters and non-type template
...
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)
Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.
Next up: dependent types and value-dependent/type-dependent
expressions.
llvm-svn: 60597
2008-12-05 18:15:24 +00:00
Steve Naroff
6d6da255fb
Fixed <rdar://problem/6213808> clang ObjC rewriter: @finally is not always executed
...
llvm-svn: 60593
2008-12-05 17:03:39 +00:00
Anders Carlsson
1aa679227b
Use VerifyIntegerConstantExpression instead of isIntegerConstantExpr. Fixes PR2963
...
llvm-svn: 60591
2008-12-05 16:33:57 +00:00
Anders Carlsson
98463cd44d
This wasn't such a good idea after all as it broke some tests.
...
llvm-svn: 60582
2008-12-05 05:24:13 +00:00
Anders Carlsson
3bc1d7d3d3
Handle __builtin___CFStringMakeConstantString in Expr::Evaluate.
...
llvm-svn: 60581
2008-12-05 05:18:05 +00:00
Anders Carlsson
1e495d9860
Make Sema::CheckForConstantInitializer use Expr::Evaluate. This fixes PR3130.
...
llvm-svn: 60580
2008-12-05 05:09:56 +00:00
Ted Kremenek
bd4551cced
Change the implementation of symbol_iterator to not use a union and rely on any details of SymbolRef's implementation.
...
llvm-svn: 60579
2008-12-05 02:56:39 +00:00
Ted Kremenek
c9e7622a52
Add SymbolRef::print() and have SymbolicRegion::print() use this method instead of calling SymbolRef::getNumber().
...
llvm-svn: 60578
2008-12-05 02:45:20 +00:00