]> granicus.if.org Git - clang/commitdiff
Add the location of the interface reference to IBOutletCollectionAttr.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 13 Sep 2011 18:41:59 +0000 (18:41 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 13 Sep 2011 18:41:59 +0000 (18:41 +0000)
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
lib/Sema/SemaDeclAttr.cpp

index 9289bd286edacabd3b81e9a4699c2ab66c352abb..4db8ef280431a500a2c908c029bf4a99285f5b71 100644 (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 {
index 7c7e3abf164097d6917ce734d7af5bb66eab8a85..a887ce8ac356aff1a4a2370959efd968750d44b0 100644 (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) {