From f1e7af36d6673185994b3d1751cf7e9a9a1491b8 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 13 Sep 2011 18:41:59 +0000 Subject: [PATCH] Add the location of the interface reference to IBOutletCollectionAttr. Depends on a llvm tablegen commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139618 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/Attr.td | 3 ++- lib/Sema/SemaDeclAttr.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 9289bd286e..4db8ef2804 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -54,6 +54,7 @@ class ExprArgument : Argument; class FunctionArgument : Argument; class TypeArgument : Argument; class UnsignedArgument : Argument; +class SourceLocArgument : Argument; class VariadicUnsignedArgument : Argument; class VariadicExprArgument : Argument; @@ -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 { diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 7c7e3abf16..a887ce8ac3 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -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) { -- 2.40.0