Add getOperatorDecls to FileUnit and ModuleDecl

Query the SourceLookupCache for the operator decls,
and use ModuleDecl::getOperatorDecls for both
frontend stats and to clean up some code
completion logic.

In addition, this commit switches getPrecedenceGroups
over to querying SourceLookupCache.
This commit is contained in:
Hamish Knight
2020-03-10 12:29:13 -07:00
parent 6c3362fb55
commit 6f212634c8
13 changed files with 83 additions and 70 deletions

View File

@@ -384,6 +384,9 @@ public:
SmallVectorImpl<Decl*> &Results,
llvm::function_ref<bool(DeclAttributes)> matchAttributes) const override;
virtual void
getOperatorDecls(SmallVectorImpl<OperatorDecl *> &results) const override;
virtual void
getPrecedenceGroups(SmallVectorImpl<PrecedenceGroupDecl*> &Results) const override;