summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-02 11:33:24 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-02 11:33:24 +0000
commit86bc21ffcf1d4875818c9631bbd95152780655a9 (patch)
tree653b91895f1dd460220d1ea90e5f4d02f530450f /clang/lib/Lex
parent7ed32cc51bc0643527da9a85ee17c29c746919ff (diff)
downloadbcm5719-llvm-86bc21ffcf1d4875818c9631bbd95152780655a9.tar.gz
bcm5719-llvm-86bc21ffcf1d4875818c9631bbd95152780655a9.zip
Provide an attribute, objc_method_family, to allow the inferred family
of an Objective-C method to be overridden on a case-by-case basis. This is a higher-level tool than ns_returns_retained &c.; it lets users specify that not only does a method have different retain/release semantics, but that it semantically acts differently than one might assume from its name. This in turn is quite useful to static analysis. llvm-svn: 126839
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PPMacroExpansion.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp
index 374f85d8b83..10abfb4b83d 100644
--- a/clang/lib/Lex/PPMacroExpansion.cpp
+++ b/clang/lib/Lex/PPMacroExpansion.cpp
@@ -540,6 +540,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("attribute_ns_consumed", true)
.Case("attribute_cf_consumed", true)
.Case("attribute_objc_ivar_unused", true)
+ .Case("attribute_objc_method_family", true)
.Case("attribute_overloadable", true)
.Case("attribute_unavailable_with_message", true)
.Case("blocks", LangOpts.Blocks)
OpenPOWER on IntegriCloud