Add the location of the interface reference to IBOutletCollectionAttr.

Depends on a llvm tablegen commit.

llvm-svn: 139618
This commit is contained in:
Argyrios Kyrtzidis 2011-09-13 18:41:59 +00:00
parent 07863d80b7
commit 8db67df663
2 changed files with 4 additions and 3 deletions

View File

@ -54,6 +54,7 @@ class ExprArgument<string name> : Argument<name>;
class FunctionArgument<string name> : Argument<name>;
class TypeArgument<string name> : Argument<name>;
class UnsignedArgument<string name> : Argument<name>;
class SourceLocArgument<string name> : Argument<name>;
class VariadicUnsignedArgument<string name> : Argument<name>;
class VariadicExprArgument<string name> : Argument<name>;
@ -287,7 +288,7 @@ def IBOutlet : InheritableAttr {
def IBOutletCollection : InheritableAttr {
let Spellings = ["iboutletcollection"];
let Args = [TypeArgument<"InterFace">];
let Args = [TypeArgument<"InterFace">, SourceLocArgument<"InterFaceLoc">];
}
def Malloc : InheritableAttr {

View File

@ -815,8 +815,8 @@ static void handleIBOutletCollection(Sema &S, Decl *D,
S.Diag(Attr.getLoc(), diag::err_iboutletcollection_type) << II;
return;
}
D->addAttr(::new (S.Context) IBOutletCollectionAttr(Attr.getRange(), S.Context,
QT));
D->addAttr(::new (S.Context) IBOutletCollectionAttr(Attr.getRange(),S.Context,
QT, Attr.getParameterLoc()));
}
static void possibleTransparentUnionPointerType(QualType &T) {