minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.
Fix protocol lists to pass down proper location info, so we get diagnostics
like this:
t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^
instead of this:
t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^
Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 4e563a9..714256a 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -241,7 +241,7 @@
SourceLocation KWLoc, IdentifierInfo *Name,
SourceLocation NameLoc, AttributeList *Attr);
virtual void ActOnDefs(Scope *S, SourceLocation DeclStart, IdentifierInfo
- *ClassName, llvm::SmallVector<DeclTy*, 16> &Decls);
+ *ClassName, llvm::SmallVectorImpl<DeclTy*> &Decls);
virtual DeclTy *ActOnField(Scope *S, SourceLocation DeclStart,
Declarator &D, ExprTy *BitfieldWidth);
@@ -615,7 +615,8 @@
SourceLocation AtInterafceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
- IdentifierInfo **ProtocolNames, unsigned NumProtocols,
+ const IdentifierLocPair *ProtocolNames,
+ unsigned NumProtocols,
SourceLocation EndProtoLoc, AttributeList *AttrList);
virtual DeclTy *ActOnCompatiblityAlias(
@@ -626,14 +627,16 @@
virtual DeclTy *ActOnStartProtocolInterface(
SourceLocation AtProtoInterfaceLoc,
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
- IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs,
+ const IdentifierLocPair *ProtoRefNames,
+ unsigned NumProtoRefs,
SourceLocation EndProtoLoc);
virtual DeclTy *ActOnStartCategoryInterface(
SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
- IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs,
+ const IdentifierLocPair *ProtoRefNames,
+ unsigned NumProtoRefs,
SourceLocation EndProtoLoc);
virtual DeclTy *ActOnStartClassImplementation(
@@ -654,14 +657,13 @@
unsigned NumElts);
virtual DeclTy *ActOnForwardProtocolDeclaration(SourceLocation AtProtocolLoc,
- IdentifierInfo **IdentList,
+ const IdentifierLocPair *IdentList,
unsigned NumElts);
virtual void FindProtocolDeclaration(SourceLocation TypeLoc,
- IdentifierInfo **ProtocolId,
+ const IdentifierLocPair *ProtocolId,
unsigned NumProtocols,
- llvm::SmallVector<DeclTy *, 8> &
- Protocols);
+ llvm::SmallVectorImpl<DeclTy *> &Protocols);
void DiagnosePropertyMismatch(ObjCPropertyDecl *Property,
ObjCPropertyDecl *SuperProperty,