mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reduce diff
This commit is contained in:
@@ -7523,16 +7523,15 @@ ERROR(extension_macro_invalid_conformance,none,
|
||||
ERROR(macro_attached_to_invalid_decl,none,
|
||||
"'%0' macro cannot be attached to %1 (%base2)",
|
||||
(StringRef, DescriptiveDeclKind, const Decl *))
|
||||
ERROR(conformance_macro,none,
|
||||
"conformance macros are replaced by extension macros",
|
||||
())
|
||||
|
||||
ERROR(macro_as_default_argument, none,
|
||||
"non-built-in macro cannot be used as default argument",
|
||||
())
|
||||
ERROR(macro_as_default_argument_arguments_must_be_literal, none,
|
||||
"argument to macro used as default argument must be literal",
|
||||
())
|
||||
ERROR(conformance_macro,none,
|
||||
"conformance macros are replaced by extension macros",
|
||||
())
|
||||
|
||||
ERROR(macro_resolve_circular_reference, none,
|
||||
"circular reference resolving %select{freestanding|attached}0 macro %1",
|
||||
|
||||
@@ -921,7 +921,7 @@ ModuleDecl::getOriginalLocation(SourceLoc loc) const {
|
||||
break;
|
||||
}
|
||||
case GeneratedSourceInfo::DefaultArgument:
|
||||
// TODO: ApolloZhu
|
||||
// No original location as it's not actually in any source file
|
||||
case GeneratedSourceInfo::ReplacedFunctionBody:
|
||||
// There's not really any "original" location for locations within
|
||||
// replaced function bodies. The body is actually different code to the
|
||||
|
||||
@@ -719,9 +719,7 @@ static SourceFile *createDefaultArgumentSourceFile(StringRef macroExpression,
|
||||
|
||||
llvm::SmallString<256> builder;
|
||||
unsigned line, column;
|
||||
// TODO: ApolloZhu check getPresumedLineAndColumnForLoc
|
||||
std::tie(line, column) = sourceMgr.getLineAndColumnInBuffer(insertionPoint);
|
||||
// TODO: ApolloZhu check getVirtualFile/getOutermostParentSourceFile
|
||||
auto file = dc->getParentSourceFile()->getFilename();
|
||||
|
||||
// find a way to pass the file:line:column to macro expansion
|
||||
|
||||
Reference in New Issue
Block a user