Sebastian Redl
8b9ad38dab
Fill in C++ status table for expressions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60763 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 14:40:01 +00:00
Sebastian Redl
0e9eabca26
Consistently use smart pointers for stmt and expr nodes in parser local variables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 13:15:23 +00:00
Steve Naroff
b619d957b0
Fix <rdar://problem/6429113> clang ObjC rewriter: crash rewriting file with Blocks and properties
...
More fancy footwork to cope with rewriting property 'setters'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 12:56:34 +00:00
Zhongxing Xu
0bc27eab20
initialize member variable.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 12:26:46 +00:00
Zhongxing Xu
2fdf555af1
Add utility method. Remove an unused method.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60758 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 10:51:19 +00:00
Ted Kremenek
159d2487e6
[static analyzer] Extend VLA size checking to look for undefined sizes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60734 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 00:44:16 +00:00
Ted Kremenek
ca9bab0dcb
Update Driver to new interface for LiveVariables.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60732 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 00:17:51 +00:00
Ted Kremenek
8322d6a4fc
Add zero-sized VLA check test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 00:14:48 +00:00
Ted Kremenek
e0dbda1364
Fixed LiveVariables bug where we didn't consider block-level expressions that functioned as the size of a VLA to be live.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-09 00:14:14 +00:00
Fariborz Jahanian
447d7aeb94
Change condition under which 'retain'/'copy' are directly evaluated.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60729 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 23:56:17 +00:00
Ted Kremenek
efd5994d6a
Add checking for zero-sized VLAs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60726 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 22:47:34 +00:00
Ted Kremenek
26b58cd65f
Incorporate MissingDealloc_IBOutlet.m test case into MissingDealloc.m
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 22:05:43 +00:00
Ted Kremenek
63de736356
Incorporate MissingDeallc_SEL.m test case into MissingDealloc.m
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60721 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 22:01:50 +00:00
Ted Kremenek
e0bb804cee
Add test case for <rdar://problem/6380411>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60720 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 21:59:21 +00:00
Chris Lattner
90b93d6f69
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60719 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 21:59:01 +00:00
Chris Lattner
891dca671a
improve comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60718 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 21:53:24 +00:00
Ted Kremenek
2c615660ec
'self.myIvar = nil' (properties) only releases myIvar when the property has kind 'assign'. This fixes <rdar://problem/6380411>.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60717 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 21:44:15 +00:00
Steve Naroff
b79c01ea32
ObjCInterfaceDecl::lookupInstanceMethod() needs to look through a categories protocols.
...
Fixes <rdar://problem/6418640> clang on prokit: error: incompatible type returning 'id', expected 'NSSize'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60716 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 20:57:28 +00:00
Steve Naroff
68272b86b3
Fix a couple uninitialized variables from my previous commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60713 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 20:01:41 +00:00
Dan Gohman
447e4c1e7b
Remove the #include of ScheduleDAGSDNodes.h, which is no longer necessary.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60712 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 19:45:33 +00:00
Fariborz Jahanian
ba45da8328
Changed 'readonly' 'retain/copy' diagnostics into
...
warning as it is allowed in gcc and will break projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 19:28:10 +00:00
Fariborz Jahanian
9bfb2a2cbe
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'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60709 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 18:47:29 +00:00
Douglas Gregor
f57172b24f
Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 18:40:42 +00:00
Steve Naroff
4ebd716f26
Fix <rdar://problem/6423452> clang ObjC rewriter: Don't use __declspec(dllimport) for Blocks functions, as they are linked statically.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 17:30:33 +00:00
Steve Naroff
8599e7a394
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60700 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 16:43:47 +00:00
Sebastian Redl
377fa5d532
Fill in some parts of cxx_status.html
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 16:24:08 +00:00
Zhongxing Xu
e50897af8b
fix 80-col violation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60693 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 07:14:51 +00:00
Zhongxing Xu
00c028b4a1
fix typo.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 05:12:38 +00:00
Eli Friedman
e9a0f43927
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60680 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 02:21:03 +00:00
Sebastian Redl
3cc461dccb
Fix outdated comment. Checks so much more than just typedefs in C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 20:13:57 +00:00
Nuno Lopes
a3d783b11f
add missing gentoo c++ include paths
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60655 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 12:11:37 +00:00
Chris Lattner
211316faa2
a minor grammar fix
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 00:59:53 +00:00
Anders Carlsson
7fd1df2a87
Pass the VLA size expr range to the VLA diags
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60645 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 00:49:48 +00:00
Anders Carlsson
96e05bc090
Improve VLA diagnostics/sema checking. Fixes PR2361 and PR2352.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60638 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-07 00:20:55 +00:00
Fariborz Jahanian
5dd4129011
Setters returning a typedef of 'void' should not cause error.
...
Bug reported by Chris L.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 23:12:49 +00:00
Fariborz Jahanian
1ac2bc4478
Use of properties declared in protocols in the category
...
via the category's protocol list1s, with appropriate
diagnsostics and a test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 23:03:39 +00:00
Anders Carlsson
601bae3b1d
Simplify test.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60631 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 22:27:22 +00:00
Fariborz Jahanian
196d0ed5e1
Improve error reporting of property and setter/getter
...
type mimatches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 21:48:16 +00:00
Fariborz Jahanian
ec604c8e1f
Check for correct'void' return type for setter methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60629 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 21:11:37 +00:00
Anders Carlsson
9f1e5727e3
Add diagnostics for bitfields.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 20:33:04 +00:00
Anders Carlsson
663388f2ea
Fix invalid bit-field.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 20:32:39 +00:00
Anders Carlsson
a75023d60f
Simplify some diagnostics.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60626 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 20:05:35 +00:00
Fariborz Jahanian
77e14bd3a7
Changed a 'FIXME' into new comment. Added a test case
...
testing declaration of properties in categories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60625 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 19:59:02 +00:00
Ted Kremenek
759623efaf
Add bandaid transfer function support for assignments involving ObjCKVCRefExpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60622 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 02:39:30 +00:00
Fariborz Jahanian
567c8df364
Patch to diagnose a variety of misuse of property
...
attributes. Example would be, readonly, assign or
assign, copy, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 01:12:43 +00:00
Douglas Gregor
5c37de7885
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 00:22:45 +00:00
Douglas Gregor
898574e749
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 23:32:09 +00:00
Fariborz Jahanian
9482a4f0fe
Fixed a comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 22:36:19 +00:00
Fariborz Jahanian
ae6f6fd152
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 :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 22:32:48 +00:00
Fariborz Jahanian
a8ef2ecf08
Fixed a test case. Added a test case showing property setter's
...
type mismatch (related to my last patch).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 18:38:31 +00:00