mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Update lib/Sema/TypeCheckMacros.cpp
Co-authored-by: John Hui <updog@j-hui.com>
This commit is contained in:
@@ -1374,8 +1374,8 @@ static SourceFile *evaluateAttachedMacro(MacroDecl *macro, Decl *attachedTo,
|
||||
dc = attachedTo->getDeclContext();
|
||||
if (!isa<ClangModuleUnit>(dc->getModuleScopeContext()))
|
||||
dc = dc->getParentSourceFile();
|
||||
else // decls imported from clang do not have a SourceFile
|
||||
ASSERT(isa<FileUnit>(dc) && !isa<SourceFile>(dc));
|
||||
else
|
||||
ASSERT(isa<FileUnit>(dc) && !isa<SourceFile>(dc) && "decls imported from Clang should not have a SourceFile");
|
||||
} else {
|
||||
dc = attachedTo->getInnermostDeclContext();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user