[AST] Add and use NominalTypeDecl::LookupDirectFlags rather than booleans.

This commit is contained in:
Graydon Hoare
2018-09-21 14:31:31 -07:00
parent 046c5f6808
commit 14db5d2285
14 changed files with 75 additions and 36 deletions

View File

@@ -231,8 +231,9 @@ static ClangNode getEffectiveClangNode(const Decl *decl) {
if (auto nominal =
const_cast<NominalTypeDecl *>(dyn_cast<NominalTypeDecl>(decl))) {
auto &ctx = nominal->getASTContext();
for (auto code : nominal->lookupDirect(ctx.Id_Code,
/*ignoreNewExtensions=*/true)) {
auto flags = OptionSet<NominalTypeDecl::LookupDirectFlags>();
flags |= NominalTypeDecl::LookupDirectFlags::IgnoreNewExtensions;
for (auto code : nominal->lookupDirect(ctx.Id_Code, flags)) {
if (auto clangDecl = code->getClangDecl())
return clangDecl;
}