diff options
author | John McCall <rjmccall@apple.com> | 2011-11-06 09:01:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-11-06 09:01:30 +0000 |
commit | 4b9c2d235fb9449e249d74f48ecfec601650de93 (patch) | |
tree | 6e4dcbc7c1cf85896e1be0ee0f29211b0d998393 /test/Analysis | |
parent | a463089f6eb37069d406f9fb56e40810edaf523a (diff) | |
download | clang-4b9c2d235fb9449e249d74f48ecfec601650de93.tar.gz |
Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.
Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.
I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r-- | test/Analysis/casts.m | 3 | ||||
-rw-r--r-- | test/Analysis/retain-release-path-notes.m | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/Analysis/casts.m b/test/Analysis/casts.m index d9700fe5c7..6f19211976 100644 --- a/test/Analysis/casts.m +++ b/test/Analysis/casts.m @@ -33,9 +33,10 @@ typedef enum { RDR10087620Enum elem; } @property (readwrite, nonatomic) RDR10087620Enum elem; +@end + static void adium_media_ready_cb(RDR10087620 *InObj) { InObj.elem |= EEOne; } -@end
\ No newline at end of file diff --git a/test/Analysis/retain-release-path-notes.m b/test/Analysis/retain-release-path-notes.m index e34942a896..dfe44748e6 100644 --- a/test/Analysis/retain-release-path-notes.m +++ b/test/Analysis/retain-release-path-notes.m @@ -1,5 +1,10 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=text -verify %s +// This actually still works after the pseudo-object refactor, it just +// uses messages that say 'method' instead of 'property'. Ted wanted +// this xfailed and filed as a bug. rdar://problem/10402993 +// XFAIL: * + /*** This file is for testing the path-sensitive notes for retain/release errors. Its goal is to have simple branch coverage of any path-based diagnostics, |