mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge branch 'master' into master-next
# Conflicts: # utils/build-script-impl
This commit is contained in:
@@ -4685,6 +4685,9 @@ public:
|
||||
SourceRange getSourceRange() const { return Loc; }
|
||||
TypeLoc &getTypeLoc() { return PlaceholderTy; }
|
||||
TypeLoc getTypeLoc() const { return PlaceholderTy; }
|
||||
SourceLoc getTrailingAngleBracketLoc() const {
|
||||
return Loc.getAdvancedLoc(Placeholder.getLength() - 1);
|
||||
}
|
||||
|
||||
/// The TypeRepr to be considered for placeholder expansion.
|
||||
TypeRepr *getTypeForExpansion() const { return ExpansionTyR; }
|
||||
|
||||
@@ -2635,7 +2635,19 @@ public:
|
||||
PrintWithColorRAII(OS, ParenthesisColor) << ')';
|
||||
}
|
||||
void visitEditorPlaceholderExpr(EditorPlaceholderExpr *E) {
|
||||
printCommon(E, "editor_placeholder_expr") << '\n';
|
||||
printCommon(E, "editor_placeholder_expr") << ' ';
|
||||
|
||||
// Print the trailing angle bracket location
|
||||
if (auto Ty = GetTypeOfExpr(E)) {
|
||||
auto &Ctx = Ty->getASTContext();
|
||||
auto TABL = E->getTrailingAngleBracketLoc();
|
||||
if (TABL.isValid()) {
|
||||
PrintWithColorRAII(OS, LocationColor) << " trailing_angle_bracket_loc=";
|
||||
TABL.print(PrintWithColorRAII(OS, LocationColor).getOS(),
|
||||
Ctx.SourceMgr);
|
||||
}
|
||||
}
|
||||
OS << '\n';
|
||||
auto *TyR = E->getTypeLoc().getTypeRepr();
|
||||
auto *ExpTyR = E->getTypeForExpansion();
|
||||
if (TyR)
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
func string_interpolation() {
|
||||
"\("abc")"
|
||||
<#Int#>
|
||||
}
|
||||
|
||||
// RUN: %target-swift-frontend -dump-ast %s | %FileCheck %s
|
||||
// RUN: not %target-swift-frontend -dump-ast %s | %FileCheck %s
|
||||
// CHECK: (interpolated_string_literal_expr {{.*}} trailing_quote_loc=SOURCE_DIR{{/|\\}}test{{/|\\}}Parse{{/|\\}}source_locs.swift:4:12 {{.*}}
|
||||
// CHECK: (editor_placeholder_expr type='()' {{.*}} trailing_angle_bracket_loc=SOURCE_DIR{{/|\\}}test{{/|\\}}Parse{{/|\\}}source_locs.swift:5:9
|
||||
|
||||
|
||||
@@ -2153,8 +2153,18 @@ for host in "${ALL_HOSTS[@]}"; do
|
||||
fi
|
||||
if [ "${SKIP_BUILD_LLVM}" ] ; then
|
||||
# We can't skip the build completely because the standalone
|
||||
# build of Swift depend on these for testing etc.
|
||||
build_targets=(llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets FileCheck not)
|
||||
# build of Swift depend on these for building and testing.
|
||||
build_targets=(llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets)
|
||||
# If we are not performing a toolchain only build, then we
|
||||
# also want to include FileCheck and not for testing
|
||||
# purposes.
|
||||
if [[ ! "${BUILD_TOOLCHAIN_ONLY}" ]] ; then
|
||||
build_targets=(
|
||||
"${build_targets[@]}"
|
||||
FileCheck
|
||||
not
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${HOST_LIBTOOL}" ] ; then
|
||||
|
||||
Reference in New Issue
Block a user