aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-07-05 22:38:59 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-07-05 22:38:59 +0000
commit9670e179a67d868e171feac44fb8f9e2f108c5e8 (patch)
treefdbc7fbb4072a90c7a2ffce680c19f82b927e20a /include/clang
parentb18b8ad63061c23daf4d95b022764027739691d8 (diff)
objc-arc: enforce performSelector rules in rejecting retaining selectors
passed to it, and unknown selectors causing potential leak. // rdar://9659270 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--include/clang/Basic/IdentifierTable.h5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 7353f2e813..c5039ff9b9 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -484,6 +484,10 @@ def error_missing_property_ivar_decl : Error<
" ivar or must explicitly name an ivar">;
def error_synthesize_weak_non_arc_or_gc : Error<
"@synthesize of 'weak' property is only allowed in ARC or GC mode">;
+def err_arc_perform_selector_retains : Error<
+ "performSelector names a selector which retains the object">;
+def warn_arc_perform_selector_leaks : Warning<
+ "performSelector may cause a leak because its selector is unknown">;
def error_synthesized_ivar_yet_not_supported : Error<
"instance variable synthesis not yet supported"
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index e01ab5362d..bebcffddde 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -488,7 +488,10 @@ enum ObjCMethodFamily {
OMF_release,
OMF_retain,
OMF_retainCount,
- OMF_self
+ OMF_self,
+
+ // performSelector families
+ OMF_performSelector
};
/// Enough bits to store any enumerator in ObjCMethodFamily or