Sema: Keep track of per-source file synthesized declarations

This allows conformance checking to be performed after all
members of a type have been type checked.
This commit is contained in:
Slava Pestov
2018-04-02 17:27:24 -07:00
parent 3bcdf1a027
commit fd79f66d39
5 changed files with 53 additions and 24 deletions

View File

@@ -854,6 +854,14 @@ public:
/// complete, we diagnose.
llvm::SetVector<const DeclAttribute *> AttrsRequiringFoundation;
/// A set of synthesized declarations that need to be type checked.
llvm::SmallVector<Decl *, 8> SynthesizedDecls;
/// We might perform type checking on the same source file more than once,
/// if its the main file or a REPL instance, so keep track of the last
/// checked synthesized declaration to avoid duplicating work.
unsigned LastCheckedSynthesizedDecl = 0;
/// A mapping from Objective-C selectors to the methods that have
/// those selectors.
llvm::DenseMap<ObjCSelector, llvm::TinyPtrVector<AbstractFunctionDecl *>>