Require "import Foundation" to use @objc in library files, too.

Make this diagnostic a little nicer in other ways, too:
- Highlight the whole attribute (including the at-sign).
- Don't hardcode the string "objc".

Swift SVN r25999
This commit is contained in:
Jordan Rose
2015-03-11 23:07:48 +00:00
parent 0cb941bf40
commit 367bfbc374
10 changed files with 34 additions and 35 deletions

View File

@@ -43,6 +43,7 @@ namespace swift {
class ASTWalker;
class BraceStmt;
class Decl;
class DeclAttribute;
class TypeDecl;
enum class DeclKind : uint8_t;
class ExtensionDecl;
@@ -839,7 +840,7 @@ public:
TinyPtrVector<TypeDecl*> LocalTypeDecls;
/// The first location where an @objc attribute appeared.
SourceLoc FirstObjCAttrLoc;
const DeclAttribute *FirstObjCAttr = nullptr;
template <typename T>
using OperatorMap = llvm::DenseMap<Identifier,llvm::PointerIntPair<T,1,bool>>;