Skip to content

Commit

Permalink
Add a comment to explain why we can't just use getMethodFamily(),
Browse files Browse the repository at this point in the history
as requested by Jordan's review.

Swift SVN r30692
  • Loading branch information
rjmccall committed Jul 27, 2015
1 parent ccf21ff commit a9742a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/SIL/SILFunctionType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,10 @@ namespace {
return ParameterConvention::Direct_Unowned;
}

/// Given that a method returns a CF type, infer its method
/// family. Unfortunately, Clang's getMethodFamily() never
/// considers a method to be in a special family if its result
/// doesn't satisfy isObjCRetainable().
clang::ObjCMethodFamily getMethodFamilyForCFResult() const {
// Trust an explicit attribute.
if (auto attr = Method->getAttr<clang::ObjCMethodFamilyAttr>()) {
Expand Down

0 comments on commit a9742a2

Please sign in to comment.