[cfe-commits] r139618 - in /cfe/trunk: include/clang/Basic/Attr.td lib/Sema/SemaDeclAttr.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Sep 13 11:42:00 PDT 2011
Author: akirtzidis
Date: Tue Sep 13 13:41:59 2011
New Revision: 139618
URL: http://llvm.org/viewvc/llvm-project?rev=139618&view=rev
Log:
Add the location of the interface reference to IBOutletCollectionAttr.
Depends on a llvm tablegen commit.
Modified:
cfe/trunk/include/clang/Basic/Attr.td
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=139618&r1=139617&r2=139618&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Tue Sep 13 13:41:59 2011
@@ -54,6 +54,7 @@
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 IBOutletCollection : InheritableAttr {
let Spellings = ["iboutletcollection"];
- let Args = [TypeArgument<"InterFace">];
+ let Args = [TypeArgument<"InterFace">, SourceLocArgument<"InterFaceLoc">];
}
def Malloc : InheritableAttr {
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=139618&r1=139617&r2=139618&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Sep 13 13:41:59 2011
@@ -815,8 +815,8 @@
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) {
More information about the cfe-commits
mailing list